Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Aug 1999 12:43:43 +0200 (CEST)
From:      Oliver Fromme <olli@dorifer.heim3.tu-clausthal.de>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Request for review: vnconfig.c
Message-ID:  <199908271043.MAA02599@dorifer.heim3.tu-clausthal.de>

next in thread | raw e-mail | index | archive | help
Ben Smithurst wrote in list.freebsd-hackers:
 > Mark J. Taylor wrote:
 > > +               dev = malloc(strlen(vnp->dev)+6);
 > > +               (void)sprintf(dev, "/dev/%s", vnp->dev);
 > 
 > You should be checking that malloc() doesn't return NULL, before trying
 > to write into the allocated space.

I'd suggest to use asprintf().

Regards
   Oliver

-- 
Oliver Fromme, Leibnizstr. 18/61, 38678 Clausthal, Germany
(Info: finger userinfo:olli@dorifer.heim3.tu-clausthal.de)

"In jedem Stück Kohle wartet ein Diamant auf seine Geburt"
                                         (Terry Pratchett)


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908271043.MAA02599>