Branch: Tag:

2017-05-02

2017-05-02 11:11:07 by Martin Karlgren <marty@roxen.com>

Config IF: Fix off-by-one issue.

This caused out-of-bounds indexing if the number of log entries was
exactly 1000.

18:    report[i] = describe_error(report[i], log[report[i]],    id->misc->cf_locale, 1);    -  if( sizeof( report ) >= 1000 ) +  if( sizeof( report ) > 1000 )    report[1000] =    sprintf(LOCALE(467,"%d entries skipped. Present in log on disk"), -  sizeof( report )-999 ); +  sizeof( report )-1000 );       return (sizeof(report)?(report[..1000]*""):LOCALE(250, "Empty"));   }