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>
Explicitly initialize chkfont variables to prevent compiler warning,
and remove GCC-specific pragmas that don't work in all GCC versions
anyway -- warnings were still issued on the MinGW cross-compiler and
in the FreeBSD 8.0 gcc.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Actually verify return values of fgets() and fscanf() in chkfont instead
of disabling the warning.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Either initialize unitialized variables to sensible values, or supress
the warning in case the variable is always correctly initialized.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Exit with return code 1 if memory allocation fails instead of just
issuing a warning and resume execution with bogus pointer values.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Add missing headers, remove unused variables, specify implicit types.
Ensure compatibility with ancient systems is maintained.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>