On Thu, May 16, 2013 at 10:54:53AM +0200, Richard Biener wrote:
> Can we properly distinguish the case of
> 
>   char *s = "Hello\0World!";
>   s[5] = ' ';
> 
> (minor the imperfections in that example)?  Thus, overwriting the terminating
> 0?

I think so.  Because then for &s[5], either si should be NULL, or si->length
should be NULL (either case suggests we either never knew or don't know any
longer the string length at that address), or should be non-constant, or should 
be zero.
Because if it is constant non-zero at that point, it would mean that
strlen (&s[5]) at that point would return non-zero constant, but should have
returned 0.

        Jakub

Reply via email to