Bug 1336699 - scanf has signed return value. r=dragana, a=jcristau
authorPatrick McManus <mcmanus@ducksong.com>
Wed, 08 Feb 2017 13:59:32 -0500
changeset 376102 f33a97693508ca30cae3cd9eb29af1bd5ec79e46
parent 376101 0e65e784125aae1836f4657e490d91654ccf1eae
child 376103 674ddd0ae1e6381deb3c75b5b692e03b3d6c7d7d
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdragana, jcristau
bugs1336699
milestone53.0a2
Bug 1336699 - scanf has signed return value. r=dragana, a=jcristau
netwerk/protocol/ftp/nsFtpConnectionThread.cpp
--- a/netwerk/protocol/ftp/nsFtpConnectionThread.cpp
+++ b/netwerk/protocol/ftp/nsFtpConnectionThread.cpp
@@ -1407,17 +1407,17 @@ nsFtpState::R_pasv() {
         if (*ptr++ != delim || *ptr != ')')
             return FTP_ERROR;
     } else {
         // The returned address string can be of the form
         // (xxx,xxx,xxx,xxx,ppp,ppp) or
         //  xxx,xxx,xxx,xxx,ppp,ppp (without parens)
         int32_t h0, h1, h2, h3, p0, p1;
 
-        uint32_t fields = 0;
+        int32_t fields = 0;
         // First try with parens
         while (*ptr && *ptr != '(')
             ++ptr;
         if (*ptr) {
             ++ptr;
             fields = PR_sscanf(ptr, 
                                "%ld,%ld,%ld,%ld,%ld,%ld",
                                &h0, &h1, &h2, &h3, &p0, &p1);