Bug 1246301 - Incorrectly parsed value for update interval in shavar response. r=francois
authordimi <dlee@mozilla.com>
Fri, 25 Mar 2016 09:50:44 +0800
changeset 290858 f3160a1e4fb6e866cad99f8b183a456f258c7f17
parent 290857 85d231a303cfe702634035ae2470e343842e9e21
child 290859 e47ddbd75bb0cd2b1afe4c720ed38c87e94d87a2
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrancois
bugs1246301
milestone48.0a1
Bug 1246301 - Incorrectly parsed value for update interval in shavar response. r=francois MozReview-Commit-ID: Ks84KmA5uKJ
toolkit/components/url-classifier/ProtocolParser.cpp
--- a/toolkit/components/url-classifier/ProtocolParser.cpp
+++ b/toolkit/components/url-classifier/ProtocolParser.cpp
@@ -125,17 +125,17 @@ ProtocolParser::ProcessControl(bool* aDo
     PARSER_LOG(("Processing %s\n", line.get()));
 
     if (StringBeginsWith(line, NS_LITERAL_CSTRING("i:"))) {
       // Set the table name from the table header line.
       SetCurrentTable(Substring(line, 2));
     } else if (StringBeginsWith(line, NS_LITERAL_CSTRING("n:"))) {
       if (PR_sscanf(line.get(), "n:%d", &mUpdateWait) != 1) {
         PARSER_LOG(("Error parsing n: '%s' (%d)", line.get(), mUpdateWait));
-        mUpdateWait = 0;
+        return NS_ERROR_FAILURE;
       }
     } else if (line.EqualsLiteral("r:pleasereset")) {
       mResetRequested = true;
     } else if (StringBeginsWith(line, NS_LITERAL_CSTRING("u:"))) {
       rv = ProcessForward(line);
       NS_ENSURE_SUCCESS(rv, rv);
     } else if (StringBeginsWith(line, NS_LITERAL_CSTRING("a:")) ||
                StringBeginsWith(line, NS_LITERAL_CSTRING("s:"))) {