[PATCH] correct_password: Handle NULL from crypt
Denys Vlasenko
vda.linux at googlemail.com
Sun Feb 9 13:39:58 UTC 2014
On Tue, Feb 4, 2014 at 2:58 PM, Harald Becker <ralda at gmx.de> wrote:
>>> char *res = crypt(clear, salt);
>>> if (!res)
>>> res = "";
>>> return xstrdup(res);
>>Yes, previously crypt returned an empty string like that. Though
>>that will throw a warning about assigning a const char to char,
>>something similar would work.
>
> Why not ... ?
>
>
> char *res = crypt(clear, salt);
> return xstrdup(res ? res : "");
>
> ... this shall avoid the warning.
Okay.
http://git.busybox.net/busybox/commit/?id=8ed96726603a59969b99e4ea30dbd9b06955084b
More information about the busybox
mailing list