diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/fontdump.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/fontdump.c b/scripts/fontdump.c index dddbac75..8bb7b8a2 100644 --- a/scripts/fontdump.c +++ b/scripts/fontdump.c @@ -73,6 +73,14 @@ main(int argc, char **argv) else basename = argv[i]; + if (strlen(basename) >= sizeof(fontname)) + { + fclose(fi); + fclose(fo); + fprintf(stderr, "fontdump: filename '%s' too long\n", basename); + return 1; + } + strcpy(fontname, basename); for (p = fontname; *p; ++p) { |