Merge branch 'v2.6.x' of ../ext-http
[m6w6/ext-http] / src / php_http_url.c
index cead8c8ddc95c026d090d0e56391f269773eb3a3..4d7629574993e365a6f1bead6cd4004701825103 100644 (file)
@@ -854,7 +854,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;
@@ -1425,7 +1425,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;
@@ -1792,7 +1792,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;