fix off-by-one error when analyzing passwords.txt (crash E3 and E4

today)
This commit is contained in:
Enno Rehling 2016-02-20 21:42:30 +01:00
parent 8054a145cc
commit 1b28beeaa1
2 changed files with 2 additions and 2 deletions

View File

@ -1,3 +1,3 @@
#define VERSION_MAJOR 3
#define VERSION_MINOR 7
#define VERSION_BUILD 11
#define VERSION_BUILD 12

View File

@ -1164,7 +1164,7 @@ char * getpasswd(int fno) {
if (F) {
while (!feof(F)) {
fgets(line, sizeof(line), F);
if (line[len+1]==':' && strncmp(prefix, line, len)==0) {
if (line[len]==':' && strncmp(prefix, line, len)==0) {
fclose(F);
return _strdup(line+len+1);
}