Peter Hutterer wrote:
> Classic strlen/strcpy mistake of
>    foo = malloc(strlen(bar));
>    strcpy(foo, bar);

That's what strdup is for, but I guess that doesn't help in the
realloc case, unless you just make that be free + strdup.

-- 
        -Alan Coopersmith-        [email protected]
         Oracle Solaris Platform Engineering: X Window System

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to