On Fri, Oct 12, 2012 at 3:05 PM, Rob Bradford <[email protected]> wrote:
> On 12 October 2012 10:28, John Kåre Alsaker <[email protected]> 
> wrote:
>
>> -                       if (length > 0)
>> +                       if (length > 0) {
>> +                               memcpy(p, s, length);
>>                                 *sp = (const char *) p;
>> -                       else
>> +                       } else
>>                                 *sp = NULL;
>>
>> -                       memcpy(p, s, length);
>>                         memset((char *) p + length, 0, aligned - length);
>>                         p += aligned / sizeof *p;
>>                         break;
>
> Out of interest - did you end up on something where this memcpy with
> length == 0 cause problems? This came up under static analysis tool
> too.
My latest 13 patches just fixes issues reported by Clang's static analyzer.

>
> Cheerio,
>
> Rob
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to