changeset: 6298:c7eff98bb299 user: Michael Elkins <[email protected]> date: Fri Feb 22 18:31:31 2013 +0000 link: http://dev.mutt.org/hg/mutt/rev/c7eff98bb299
increase string size by one byte to accomodate the terminating null character in fscanf() since the maximum field width does not include it closes #3636 hat tip: Will Fiveash diffs (21 lines): diff -r 14596ac2b323 -r c7eff98bb299 smime.c --- a/smime.c Fri Feb 22 16:30:40 2013 +0000 +++ b/smime.c Fri Feb 22 18:31:31 2013 +0000 @@ -357,7 +357,7 @@ char index_file[_POSIX_PATH_MAX]; FILE *index; char buf[LONG_STRING]; - char fields[5][STRING]; + char fields[5][STRING+1]; /* +1 due to use of fscanf() below. the max field width does not include the null terminator (see http://dev.mutt.org/trac/ticket/3636) */ int numFields, hash_suffix, done, cur; /* The current entry */ MUTTMENU* menu; unsigned int hash; @@ -470,7 +470,7 @@ int addr_len, query_len, found = 0, ask = 0, choice = 0; char cert_path[_POSIX_PATH_MAX]; char buf[LONG_STRING], prompt[STRING]; - char fields[5][STRING]; + char fields[5][STRING+1]; /* +1 due to use of fscanf() below. the max field width does not include the null terminator (see http://dev.mutt.org/trac/ticket/3636) */ char key[STRING]; int numFields; struct stat info;
