Bug 726417: Signed/unsigned comparison in nsCacheMetaData::UnflattenMetaData r=jduell
authorMs2ger <ms2ger@gmail.com>
Mon, 13 Feb 2012 11:32:31 -0800
changeset 89620 9d8f174bc89d4c030b2d19b3a138eb5267a48c7b
parent 89619 da94847d66d438a964cf5e75a813543a8badbcde
child 89621 108f5491cf3fecd04805b98cbbb7c33c5ed3afb9
push id783
push userlsblakk@mozilla.com
push dateTue, 24 Apr 2012 17:33:42 +0000
treeherdermozilla-beta@11faed19f136 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjduell
bugs726417
milestone13.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 726417: Signed/unsigned comparison in nsCacheMetaData::UnflattenMetaData r=jduell
netwerk/cache/nsCacheMetaData.cpp
--- a/netwerk/cache/nsCacheMetaData.cpp
+++ b/netwerk/cache/nsCacheMetaData.cpp
@@ -136,17 +136,17 @@ nsCacheMetaData::UnflattenMetaData(const
         // Check if the metadata ends with a zero byte.
         if (data[size-1] != '\0') {
             NS_ERROR("Cache MetaData is not null terminated");
             return NS_ERROR_ILLEGAL_VALUE;
         }
         // Check that there are an even number of zero bytes
         // to match the pattern { key \0 value \0 }
         bool odd = false;
-        for (int i = 0; i < size; i++) {
+        for (PRUint32 i = 0; i < size; i++) {
             if (data[i] == '\0') 
                 odd = !odd;
         }
         if (odd) {
             NS_ERROR("Cache MetaData is malformed");
             return NS_ERROR_ILLEGAL_VALUE;
         }