Bug 1211722 - Remove signed/unsigned comparison in pl_base64_decode_buffer, r=kaie
authorMartin Thomson <martin.thomson@gmail.com>
Mon, 25 Sep 2017 10:36:52 +1000
changeset 13604 96a835be15192281d67a8b1046b7f159ff6deb12
parent 13603 e84403331d99bb1fcad4a879f42749332861e8e1
child 13611 fe8b221d3bded99b2b21e2e62fb27cc8c659ec2f
push id2385
push usermartin.thomson@gmail.com
push dateMon, 25 Sep 2017 00:38:05 +0000
reviewerskaie
bugs1211722
Bug 1211722 - Remove signed/unsigned comparison in pl_base64_decode_buffer, r=kaie
lib/util/nssb64d.c
--- a/lib/util/nssb64d.c
+++ b/lib/util/nssb64d.c
@@ -244,17 +244,17 @@ pl_base64_decode_buffer(PLBase64Decoder 
 
         if (i < 4) {
             /* Didn't get enough for a complete token. */
             data->token_size = i;
             break;
         }
         i = 0;
 
-        PR_ASSERT((out - data->output_buffer + 3) <= data->output_buflen);
+        PR_ASSERT((PRUint32)(out - data->output_buffer + 3) <= data->output_buflen);
 
         /*
          * Assume we are not at the end; the following function only works
          * for an internal token (no trailing padding characters) but is
          * faster that way.  If it hits an invalid character (padding) it
          * will return an error; we break out of the loop and try again
          * calling the routine that will handle a final token.
          * Note that we intentionally do it this way rather than explicitly