]> granicus.if.org Git - php/commitdiff
Fix unsigned comparison
authorAnatol Belski <ab@php.net>
Fri, 17 Nov 2017 17:53:37 +0000 (18:53 +0100)
committerAnatol Belski <ab@php.net>
Fri, 17 Nov 2017 17:53:37 +0000 (18:53 +0100)
ext/standard/filters.c

index afdf74380b0ce231df9409dc5ae10b6d55281e36..3a9daf293e2af7a95267bc1bdbd8fbfecc0f146c 100644 (file)
@@ -822,7 +822,7 @@ static php_conv_err_t php_conv_qprint_encode_convert(php_conv_qprint_encode *ins
                        }
                }
 
-               if (lb_ptr >= lb_cnt && icnt <= 0) {
+               if (lb_ptr >= lb_cnt && icnt == 0) {
                        break;
                }
 
@@ -1028,7 +1028,7 @@ static php_conv_err_t php_conv_qprint_decode_convert(php_conv_qprint_decode *ins
        for (;;) {
                switch (scan_stat) {
                        case 0: {
-                               if (icnt <= 0) {
+                               if (icnt == 0) {
                                        goto out;
                                }
                                if (*ps == '=') {
@@ -1045,7 +1045,7 @@ static php_conv_err_t php_conv_qprint_decode_convert(php_conv_qprint_decode *ins
                        } break;
 
                        case 1: {
-                               if (icnt <= 0) {
+                               if (icnt == 0) {
                                        goto out;
                                }
                                if (*ps == ' ' || *ps == '\t') {
@@ -1074,7 +1074,7 @@ static php_conv_err_t php_conv_qprint_decode_convert(php_conv_qprint_decode *ins
                        } /* break is missing intentionally */
 
                        case 2: {
-                               if (icnt <= 0) {
+                               if (icnt == 0) {
                                        goto out;
                                }
 
@@ -1101,7 +1101,7 @@ static php_conv_err_t php_conv_qprint_decode_convert(php_conv_qprint_decode *ins
                        } break;
 
                        case 4: {
-                               if (icnt <= 0) {
+                               if (icnt == 0) {
                                        goto out;
                                }
                                if (lb_cnt < inst->lbchars_len &&