projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
391c85f
)
- fix endless loop with bad input
author
Michael Wallner
<mike@php.net>
Mon, 14 Nov 2005 14:49:45 +0000
(14:49 +0000)
committer
Michael Wallner
<mike@php.net>
Mon, 14 Nov 2005 14:49:45 +0000
(14:49 +0000)
http_filter_api.c
patch
|
blob
|
history
diff --git
a/http_filter_api.c
b/http_filter_api.c
index 53877e2a3f08d3f4c281125009f856fc5813d46b..421c07fb289e7455a35dde4c64af94c38d422a7e 100644
(file)
--- a/
http_filter_api.c
+++ b/
http_filter_api.c
@@
-114,7
+114,7
@@
static HTTP_FILTER_FUNCTION(chunked_decode)
/* we have data in our buffer */
while (PHPSTR_LEN(buffer)) {
/* we have data in our buffer */
while (PHPSTR_LEN(buffer)) {
-
+ fprintf(stderr, ">>> loop\n");
/* we already know the size of the chunk and are waiting for data */
if (buffer->hexlen) {
/* we already know the size of the chunk and are waiting for data */
if (buffer->hexlen) {
@@
-191,6
+191,9
@@
static HTTP_FILTER_FUNCTION(chunked_decode)
phpstr_cut(PHPSTR(buffer), 0, eolstr + eollen - PHPSTR_VAL(buffer));
/* buffer->hexlen is 0 now or contains the size of the next chunk */
/* continue */
phpstr_cut(PHPSTR(buffer), 0, eolstr + eollen - PHPSTR_VAL(buffer));
/* buffer->hexlen is 0 now or contains the size of the next chunk */
/* continue */
+ } else {
+ /* we have not enough data buffered to read in chunk size */
+ break;
}
}
/* break */
}
}
/* break */