Bug 1246301 - Incorrectly parsed value for update interval in shavar response. r=francois draft
authordimi <dlee@mozilla.com>
Fri, 25 Mar 2016 09:50:44 +0800
changeset 344638 809c91def6ce48612822b61a0cbab530979d79ce
parent 344625 b942c98f56c4c2926b8b81b98425072a091bbf7b
child 517012 7583d2c20e1130be02b9329353485593c71000e1
push id13889
push userbmo:dlee@mozilla.com
push dateFri, 25 Mar 2016 01:52:10 +0000
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:"))) {