1. The brigade contains only META buckets.
2. The last data bucket is of zero length.
Pointed out by: niq
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@610061
13f79535-47bb-0310-9956-
ffa450edef68
break;
}
}
+ /* We only had META buckets in this brigade */
+ if (e == APR_BRIGADE_SENTINEL(b)) {
+ return APR_EAGAIN;
+ }
rv = apr_bucket_read(e, &lineend, &len, APR_BLOCK_READ);
if (rv != APR_SUCCESS) {
return rv;
}
- if (lineend[len - 1] != APR_ASCII_LF) {
+ if ((len == 0) || (lineend[len - 1] != APR_ASCII_LF)) {
return APR_EAGAIN;
}
/* Line is complete. So reset ctx->linesize for next round. */