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.

Cheerio,

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

Reply via email to