On 10/14/2016 11:38 AM, Richard Biener wrote:
> On Thu, Oct 13, 2016 at 5:23 PM, Martin Liška <mli...@suse.cz> wrote:
>> Hello.
>>
>> After receiving feedback from Richi and Wilco Dijkstra, I decided to fully 
>> not
>> support not null-terminated strings. It brings more complications and the 
>> code has started
>> to be overengineered. Thus c_getstr accepts only such strings and as a bonus 
>> it returns
>> length of a string.
>>
>> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
>>
>> Ready to be installed?
> 
> +  /* Support only properly null-terminated strings.  */
> +  if (string_length == 0
> +      || string[string_length - 1] != '\0'
> +      || offset > string_length)
> 
> shouldn't this be offset >= string_length?

Yes, it should be that, installed as r241152.

Thanks,
Martin

> 
> Ok with that change.
> 
> Thanks,
> Richard.
> 
>> Martin

Reply via email to