This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCHv7] nss_db: protect against empty mappings


* Florian Weimer:

> * DJ Delorie:
>
>> +  rest = "/makedb -o /var/db/passwd.db /var/db/passwd.in";
>> +  cmd = (char *) xmalloc (strlen (support_bindir_prefix)
>> +				+ strlen (rest) + 1);
>> +  strcpy (cmd, support_bindir_prefix);
>> +  strcat (cmd, rest);
>> +
>> +  system (cmd);
>> +
>> +  try_it ();
>> +  try_it ();
>
> You could use xasprintf and free the pointer.

Please also post the planned commit message.  Thanks.

Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]