8 Commits

Author SHA1 Message Date
Jonathan McCrohan
24b935eb59 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>
2012-05-30 09:56:58 -03:00
Claudio Matsuoka
6ab60b0cc6 Address Turbo C warnings
Return from main() using return instead of exit().

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-11 18:54:37 -02:00
Claudio Matsuoka
63a1f39cf4 Initialize variables to prevent compiler warning
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>
2011-01-11 18:03:55 -02:00
Claudio Matsuoka
f926ed97ac Address ignored return value warnings in chkfont
Actually verify return values of fgets() and fscanf() in chkfont instead
of disabling the warning.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-11 17:54:24 -02:00
Claudio Matsuoka
a2d9196f41 Address unitialized variable compiler warnings
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>
2011-01-11 17:14:16 -02:00
Claudio Matsuoka
fd06fbe143 Handle memory allocation errors
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>
2011-01-10 08:12:28 -02:00
Claudio Matsuoka
27cd08716a Address compiler warnings
Add missing headers, remove unused variables, specify implicit types.
Ensure compatibility with ancient systems is maintained.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-10 08:04:29 -02:00
Claudio Matsuoka
47c9d2db33 Import FIGlet 2.2.2
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
2011-01-10 07:37:04 -02:00