[PATCH] modutils/modprobe.c: Avoid a possible NULL pointer dereference +4
Ozan Çağlayan
ozan at pardus.org.tr
Tue Jan 26 08:05:34 UTC 2010
Denys Vlasenko wrote On 26-01-2010 09:17:
> On Tuesday 26 January 2010 08:09, Ozan Çağlayan wrote:
> How about protecting other branch too?
>
> if (append) {
> if (opts == NULL) {
> opts = xstrdup(append);
> } else {
> int optlen = strlen(opts);
> opts = xrealloc(opts, optlen + strlen(append) + 2);
> sprintf(opts + optlen, " %s", append);
> }
> }
Hm yes that seems clearer even xstrdup handles NULL pointers too. Will send the revised patch, thanks.
More information about the busybox
mailing list