On 21.12.2009 01:40, [email protected] wrote: > Author: niq > Date: Mon Dec 21 00:40:07 2009 > New Revision: 892678 > > URL: http://svn.apache.org/viewvc?rev=892678&view=rev > Log: > Reject requests containing (invalid) NULL characters in request line > or request headers. > PR 43039 > > Modified: > httpd/httpd/trunk/CHANGES > httpd/httpd/trunk/server/protocol.c >
> Modified: httpd/httpd/trunk/server/protocol.c > URL: > http://svn.apache.org/viewvc/httpd/httpd/trunk/server/protocol.c?rev=892678&r1=892677&r2=892678&view=diff > ============================================================================== > --- httpd/httpd/trunk/server/protocol.c (original) > +++ httpd/httpd/trunk/server/protocol.c Mon Dec 21 00:40:07 2009 > @@ -431,8 +431,13 @@ > } > } > } > - > *read = bytes_handled; > + > + /* PR#43039: We shouldn't accept NULL bytes within the line */ > + if (strlen(*s) < bytes_handled - 1) { Why bytes_handled - 1 and not bytes_handled? > + return APR_EINVAL; > + } > + > return APR_SUCCESS; > } > Regards Rüdiger
