Re: parsing quoted-string HTTP header fields

From: Tsantilas Christos <chtsanti_at_users.sourceforge.net>
Date: Fri, 27 May 2011 00:37:53 +0300

On 05/26/2011 11:38 PM, Alex Rousskov wrote:
> On 05/26/2011 10:23 AM, Tsantilas Christos wrote:
>>> Can the above double increment lead to *pos pointing beyond the string
>>> boundaries?
>>
>> Yes it can, but we do not care because we do not modifying anything
>
> but we are _reading_ those values. I guess there is an undocumented
> assumption that the string actually exists beyond the start+len boundary
> and whatever characters happen to live after the official end will not
> match any of the special characters we worry about.

Even if we read any of the characters we worry about the parsing will
fail on the next "if(pos-start > len)" test some lines after.
There is problem here with the debugs statement and of course accessing
memory which is not given to your process, may causing problems. Just
forget my previous email/comment...

>
> Alex.
>
>
Received on Thu May 26 2011 - 21:37:59 MDT

This archive was generated by hypermail 2.2.0 : Fri May 27 2011 - 12:00:05 MDT