forked from github/server
fix off-by-one error when analyzing passwords.txt (crash E3 and E4
today)
This commit is contained in:
parent
8054a145cc
commit
1b28beeaa1
|
@ -1,3 +1,3 @@
|
|||
#define VERSION_MAJOR 3
|
||||
#define VERSION_MINOR 7
|
||||
#define VERSION_BUILD 11
|
||||
#define VERSION_BUILD 12
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue