Fix chkfont coredump on invalid input
Based on patch submitted by Kenneth Davies <kshrub@yahoo.com> submitted in Debian bug #300735. Decrufted to provide double free() fix, with minimal changes to FIGlet coding styles. Bug-Debian: http://bugs.debian.org/300735 Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com> Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
This commit is contained in:
parent
e0e63ca90a
commit
24b935eb59
@ -272,6 +272,7 @@ numsread=sscanf(fileline,"%c %d %d %d %d %d %d %d %d",
|
||||
&hardblank,&charheight,&upheight,&maxlen,&old_layout,&cmtcount,
|
||||
&ffrighttoleft,&layout,&spectagcnt);
|
||||
free(fileline);
|
||||
fileline = NULL;
|
||||
if (numsread<7) {
|
||||
ffrighttoleft=0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user