fix PHP-73185
[m6w6/ext-http] / src / php_http_url.c
index 8384f99a8c7df39e2d3e678de739c3f38308c68b..474a7bfed85350d7fc5681da723f0bb3826e35a6 100644 (file)
@@ -836,7 +836,7 @@ static ZEND_RESULT_CODE parse_userinfo(struct parse_state *state, const char *pt
                        break;
 
                }
-       } while(++ptr != end);
+       } while(++ptr < end);
 
 
        state->buffer[state->offset++] = 0;
@@ -1231,7 +1231,7 @@ static ZEND_RESULT_CODE parse_hostinfo(struct parse_state *state, const char *pt
                        label = ptr;
                        ptr += mb - 1;
                }
-       } while (++ptr != end);
+       } while (++ptr < end);
 
        if (!state->url.host) {
                len = state->offset - len;
@@ -1612,7 +1612,7 @@ static const char *parse_scheme(struct parse_state *state)
                        }
                        state->ptr += mb - 1;
                }
-       } while (++state->ptr != state->end);
+       } while (++state->ptr < state->end);
 
 softfail:
        state->offset = 0;