On Sun, Dec  5, 2010 at 11:10:23 +0100, walter harms wrote:

> > diff --git a/hw/xfree86/common/xf86ShowOpts.c 
> > b/hw/xfree86/common/xf86ShowOpts.c
> > index ce86090..c0fa80a 100644
> > --- a/hw/xfree86/common/xf86ShowOpts.c
> > +++ b/hw/xfree86/common/xf86ShowOpts.c
> > @@ -97,11 +97,8 @@ void DoShowOptions (void) {
> >                             );
> >                             continue;                                       
> >                 
> >                     }
> > -                   pSymbol = malloc(
> > -                           strlen(xf86DriverList[i]->driverName) + 
> > strlen("ModuleData") + 1
> > -                   );
> > -                   strcpy (pSymbol, xf86DriverList[i]->driverName);
> > -                   strcat (pSymbol, "ModuleData");
> > +                   XNFasprintf(&pSymbol, "%sModuleData",
> > +                               xf86DriverList[i]->driverName);
> 
> 
> every code before checks the return value of asprintf but not here ?
> 
The "NF" variant doesn't fail, it calls FatalError if it can't allocate
memory.

Cheers,
Julien
_______________________________________________
[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