Bug 1281419 - ignore negative icon size in URI. r=seth
authorLee Salzman <lsalzman@mozilla.com>
Thu, 23 Jun 2016 10:47:36 -0400
changeset 302494 45fb2585696d35cf628486eac7022aaed16d9939
parent 302493 8a1a3f39c99bb847bc4c9fa2428fa0bf5e45ebba
child 302495 ccae0e80b4de3aab834277dfede0602241b9a53e
push id30363
push usercbook@mozilla.com
push dateFri, 24 Jun 2016 09:14:27 +0000
treeherdermozilla-central@939ecc4e9d05 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersseth
bugs1281419
milestone50.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 1281419 - ignore negative icon size in URI. r=seth
image/decoders/icon/nsIconURI.cpp
--- a/image/decoders/icon/nsIconURI.cpp
+++ b/image/decoders/icon/nsIconURI.cpp
@@ -187,17 +187,17 @@ nsMozIconURI::SetSpec(const nsACString& 
       for (uint32_t i = 0; i < ArrayLength(kSizeStrings); i++) {
         if (PL_strcasecmp(sizeStr, kSizeStrings[i]) == 0) {
           mIconSize = i;
           break;
         }
       }
 
       int32_t sizeValue = atoi(sizeString.get());
-      if (sizeValue) {
+      if (sizeValue > 0) {
         mSize = sizeValue;
       }
     }
 
     nsAutoCString stateString;
     extractAttributeValue(iconSpec.get(), "state=", stateString);
     if (!stateString.IsEmpty()) {
       const char* stateStr = stateString.get();