Bug 1039166 - Fix intermittent gtest ASAN errors. r=dkeeler, a=test-only
authorCamilo Viecco <cviecco@mozilla.com>
Thu, 28 Aug 2014 15:33:10 -0700
changeset 217742 032d5a12a6da5f37e234fd9ba3cc013406030842
parent 217741 27c670206df9cf6c09d3f14d2547665d9305417b
child 217743 e9b04954e3377a2a8d0e7b90b1e26bee890acceb
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdkeeler, test-only
bugs1039166
milestone33.0a2
Bug 1039166 - Fix intermittent gtest ASAN errors. r=dkeeler, a=test-only
security/pkix/test/lib/pkixtestutil.cpp
--- a/security/pkix/test/lib/pkixtestutil.cpp
+++ b/security/pkix/test/lib/pkixtestutil.cpp
@@ -134,16 +134,17 @@ TamperOnce(SECItem& item,
     if (!memcmp(foundFirstByte, from, fromLen)) {
       if (alreadyFoundMatch) {
         PR_SetError(SEC_ERROR_BAD_DATA, 0);
         return SECFailure;
       }
       alreadyFoundMatch = true;
       memmove(foundFirstByte, to, toLen);
       p = foundFirstByte + toLen;
+      remaining -= toLen;
     } else {
       p = foundFirstByte + 1;
       --remaining;
     }
   }
 }
 
 class Output