On Tue, 25 Oct 2011 11:41:57 +1000, Peter Hutterer <[email protected]> wrote:
> tam_key = (strchr(string, '=') - string); > - newopt->key = (char *)malloc(tam_key); > - strncpy(newopt->key, string, tam_key); > - newopt->key[tam_key] = '\0'; > - newopt->value = strdup(strchr(string, '=') + 1); > + key = malloc(tam_key); I realize the old code didn't check malloc returns, but it seems wrong to leave bugs like that lying around. And, do we allow the use of strndup in the server? Otherwise, this patch is Reviewed-by: Keith Packard <[email protected]> -- [email protected]
pgpcptC1wn5wG.pgp
Description: PGP signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
