slackware-current/source/n/vsftpd/vsftpd.crypt.diff

21 lines
696 B
Diff
Raw Permalink Normal View History

--- ./sysdeputil.c.orig 2012-09-15 23:18:04.000000000 -0500
+++ ./sysdeputil.c 2016-06-12 23:49:19.539253144 -0500
@@ -285,7 +285,7 @@
return 0;
}
p_crypted = crypt(str_getbuf(p_pass_str), p_spwd->sp_pwdp);
- if (!vsf_sysutil_strcmp(p_crypted, p_spwd->sp_pwdp))
+ if (p_crypted != NULL && !vsf_sysutil_strcmp(p_crypted, p_spwd->sp_pwdp))
{
return 1;
}
@@ -293,7 +293,7 @@
}
#endif /* VSF_SYSDEP_HAVE_SHADOW */
p_crypted = crypt(str_getbuf(p_pass_str), p_pwd->pw_passwd);
- if (!vsf_sysutil_strcmp(p_crypted, p_pwd->pw_passwd))
+ if (p_crypted != NULL && !vsf_sysutil_strcmp(p_crypted, p_pwd->pw_passwd))
{
return 1;
}