openssh: misc_c.patch: ensure pw_passwd has xstrdup'd string

This commit is contained in:
Faheem Pervez 2020-06-16 09:24:36 +01:00 committed by Leonid Pliushch
parent 702a7f1e41
commit 3cc7fde280
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ diff -u -r ../openssh-6.4p1/misc.c ./misc.c
copy->pw_name = xstrdup(pw->pw_name);
- copy->pw_passwd = xstrdup(pw->pw_passwd);
+ copy->pw_passwd = pw->pw_passwd == NULL ? "*" : xstrdup(pw->pw_passwd);
+ copy->pw_passwd = xstrdup(pw->pw_passwd == NULL ? "*" : pw->pw_passwd);
#ifdef HAVE_STRUCT_PASSWD_PW_GECOS
copy->pw_gecos = xstrdup(pw->pw_gecos);
#endif