diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/encparse.c | 4 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2006-04-06 Adam Jackson <ajax@freedesktop.org> + + * src/encparse.c: + Coverity #544: File a file descriptor leak. + 2005-12-20 Kevin E. Martin <kem-at-freedesktop-dot-org> * configure.ac: 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 { |