diff -up cracklib-2.9.6/lib/fascist.c.overflow cracklib-2.9.6/lib/fascist.c --- cracklib-2.9.6/lib/fascist.c.overflow 2015-10-23 16:58:38.403319225 +0200 +++ cracklib-2.9.6/lib/fascist.c 2016-12-08 17:28:41.490101358 +0100 @@ -515,7 +515,7 @@ FascistGecosUser(char *password, const c char gbuffer[STRINGSIZE]; char tbuffer[STRINGSIZE]; char *uwords[STRINGSIZE]; - char longbuffer[STRINGSIZE * 2]; + char longbuffer[STRINGSIZE]; if (gecos == NULL) gecos = ""; @@ -596,38 +596,47 @@ FascistGecosUser(char *password, const c { for (i = 0; i < j; i++) { - strcpy(longbuffer, uwords[i]); - strcat(longbuffer, uwords[j]); - - if (GTry(longbuffer, password)) + if (strlen(uwords[i]) + strlen(uwords[j]) < STRINGSIZE) { - return _("it is derived from your password entry"); - } - - strcpy(longbuffer, uwords[j]); - strcat(longbuffer, uwords[i]); + strcpy(longbuffer, uwords[i]); + strcat(longbuffer, uwords[j]); - if (GTry(longbuffer, password)) - { - return _("it's derived from your password entry"); + if (GTry(longbuffer, password)) + { + return _("it is derived from your password entry"); + } + + strcpy(longbuffer, uwords[j]); + strcat(longbuffer, uwords[i]); + + if (GTry(longbuffer, password)) + { + return _("it's derived from your password entry"); + } } - longbuffer[0] = uwords[i][0]; - longbuffer[1] = '\0'; - strcat(longbuffer, uwords[j]); - - if (GTry(longbuffer, password)) + if (strlen(uwords[j]) < STRINGSIZE - 1) { - return _("it is derivable from your password entry"); + longbuffer[0] = uwords[i][0]; + longbuffer[1] = '\0'; + strcat(longbuffer, uwords[j]); + + if (GTry(longbuffer, password)) + { + return _("it is derivable from your password entry"); + } } - longbuffer[0] = uwords[j][0]; - longbuffer[1] = '\0'; - strcat(longbuffer, uwords[i]); - - if (GTry(longbuffer, password)) + if (strlen(uwords[i]) < STRINGSIZE - 1) { - return _("it's derivable from your password entry"); + longbuffer[0] = uwords[j][0]; + longbuffer[1] = '\0'; + strcat(longbuffer, uwords[i]); + + if (GTry(longbuffer, password)) + { + return _("it's derivable from your password entry"); + } } } } diff -rupN 3/lib/rules.c 3-patched/lib/rules.c --- 3/lib/rules.c 2016-08-16 14:16:24.033261876 +0200 +++ 3-patched/lib/rules.c 2016-08-17 13:57:14.485782894 +0200 @@ -434,9 +434,8 @@ Mangle(input, control) /* returns a poi { int limit; register char *ptr; - static char area[STRINGSIZE]; - char area2[STRINGSIZE]; - area[0] = '\0'; + static char area[STRINGSIZE * 2] = {0}; + char area2[STRINGSIZE * 2] = {0}; strcpy(area, input); for (ptr = control; *ptr; ptr++)