X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_url.c;fp=php_http_url.c;h=14ad6f7067b6444577571e8046e17e0f7b71979c;hp=951af23993d0e4bd7415edd5d84786138a2f1e6e;hb=860f294514633abead8ed6df000655a93e98a30c;hpb=415a3dff9a905d9d76ce0f43db03b3cabc26693c;ds=sidebyside diff --git a/php_http_url.c b/php_http_url.c index 951af23..14ad6f7 100644 --- a/php_http_url.c +++ b/php_http_url.c @@ -1271,7 +1271,7 @@ static const char *parse_query(struct parse_state *state) tmp = ++state->ptr; state->url.query = &state->buffer[state->offset]; - do { + while(state->ptr < state->end) { switch (*state->ptr) { case '#': goto done; @@ -1323,7 +1323,9 @@ static const char *parse_query(struct parse_state *state) } state->ptr += mb - 1; } - } while (++state->ptr < state->end); + + ++state->ptr; + } done: state->buffer[state->offset++] = 0;