From: Mike Frysinger Date: Sat, 15 Jul 2006 03:59:00 +0000 (-0000) Subject: Tito writes: If the gecos field of an user is empty, obscure reports a false "similar... X-Git-Tag: 1_2_0~13 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=83169c607be1dbaa8731f73d71cbf990fc4cb05d;p=oweals%2Fbusybox.git Tito writes: If the gecos field of an user is empty, obscure reports a false "similar to gecos" error. --- diff --git a/libbb/obscure.c b/libbb/obscure.c index 1112e11cb..3353df949 100644 --- a/libbb/obscure.c +++ b/libbb/obscure.c @@ -109,7 +109,7 @@ static const char *obscure_msg(const char *old_p, const char *new_p, const struc return "similar to username"; } /* no gecos as-is, as sub-string, reversed, capitalized, doubled */ - if (string_checker(new_p, pw->pw_gecos)) { + if (*pw->pw_gecos && string_checker(new_p, pw->pw_gecos)) { return "similar to gecos"; } /* hostname as-is, as sub-string, reversed, capitalized, doubled */