diff options
Diffstat (limited to 'src/encparse.c')
-rw-r--r-- | src/encparse.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/encparse.c b/src/encparse.c index 285f5a1..2263c95 100644 --- a/src/encparse.c +++ b/src/encparse.c @@ -867,8 +867,10 @@ FontEncReallyReallyLoad(const char *charset, if(!strcasecmp(encoding_name, charset)) { /* Found it */ if(file_name[0] != '/') { - if(strlen(dir) + strlen(file_name) >= MAXFONTFILENAMELEN) + if(strlen(dir) + strlen(file_name) >= MAXFONTFILENAMELEN) { + fclose(file); return NULL; + } strcpy(buf, dir); strcat(buf, file_name); } else { |