Changeset 1289 for toilet


Ignore:
Timestamp:
Nov 6, 2006, 1:45:34 AM (13 years ago)
Author:
Sam Hocevar
Message:
  • Add a sanity check to the FIGlet font loader.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • toilet/trunk/src/figlet.c

    r1242 r1289  
    199199                break;
    200200
    201             if(!buf[0])
     201            if(!buf[0] || buf[0] < '0' || buf[0] > '9')
    202202            {
    203203                free(data);
    204204                free(cx->lookup);
    205                 fprintf(stderr, "read error at glyph %u in `%s'\n",
     205                fprintf(stderr, "read error at glyph #%u in `%s'\n",
    206206                                cx->glyphs, path);
    207207                return -1;
Note: See TracChangeset for help on using the changeset viewer.