diff -Nru mailutils-2.99.98/debian/changelog mailutils-2.99.98/debian/changelog --- mailutils-2.99.98/debian/changelog 2013-07-03 09:10:03.000000000 +0000 +++ mailutils-2.99.98/debian/changelog 2013-11-22 19:10:13.000000000 +0000 @@ -1,3 +1,11 @@ +mailutils (1:2.99.98-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Add patch by Steve M. Robbins to fix a crash upon authentication. + (Closes: #720060) + + -- Philipp Kern Fri, 22 Nov 2013 20:09:51 +0100 + mailutils (1:2.99.98-1) unstable; urgency=low * New upstream release. diff -Nru mailutils-2.99.98/debian/patches/fix-authentication.patch mailutils-2.99.98/debian/patches/fix-authentication.patch --- mailutils-2.99.98/debian/patches/fix-authentication.patch 1970-01-01 00:00:00.000000000 +0000 +++ mailutils-2.99.98/debian/patches/fix-authentication.patch 2013-11-22 19:09:37.000000000 +0000 @@ -0,0 +1,37 @@ +Index: mailutils-2.99.97/libmailutils/auth/system.c +=================================================================== +--- mailutils-2.99.97.orig/libmailutils/auth/system.c 2013-11-22 19:35:39.370348860 +0100 ++++ mailutils-2.99.97/libmailutils/auth/system.c 2013-11-22 19:35:39.366348811 +0100 +@@ -104,9 +104,17 @@ + if (!auth_data || !pass) + return EINVAL; + +- return auth_data->passwd +- && strcmp (auth_data->passwd, crypt (pass, auth_data->passwd)) == 0 ? ++ if (!auth_data->passwd) ++ return MU_ERR_AUTH_FAILURE; ++ ++ { ++ char *crypt_pass = crypt (pass, auth_data->passwd); ++ if (!crypt_pass) ++ return MU_ERR_AUTH_FAILURE; ++ ++ return strcmp (auth_data->passwd, crypt_pass) == 0 ? + 0 : MU_ERR_AUTH_FAILURE; ++ } + } + + /* Called only if generic fails */ +@@ -126,8 +134,11 @@ + struct spwd *spw; + spw = getspnam (auth_data->name); + if (spw) +- return strcmp (spw->sp_pwdp, crypt (pass, spw->sp_pwdp)) == 0 ? ++ { ++ char *crypt_pass = crypt (pass, spw->sp_pwdp); ++ return crypt_pass && strcmp (spw->sp_pwdp, crypt_pass) == 0 ? + 0 : MU_ERR_AUTH_FAILURE; ++ } + } + #endif + return MU_ERR_AUTH_FAILURE; diff -Nru mailutils-2.99.98/debian/patches/series mailutils-2.99.98/debian/patches/series --- mailutils-2.99.98/debian/patches/series 2013-07-03 08:24:24.000000000 +0000 +++ mailutils-2.99.98/debian/patches/series 2013-11-22 19:09:45.000000000 +0000 @@ -2,3 +2,4 @@ texinfo_fixes.patch tokyocabinet_dependencies.patch guile_bindir.patch +fix-authentication.patch