fixed off-by-one bug
[swftools.git] / pdf2swf / SWFOutputDev.cc
index 40d8847..871dbac 100644 (file)
@@ -2704,7 +2704,7 @@ void pdfswf_addlanguagedir(char*dir)
 
     int l;
     FILE*fi = 0;
-    char* config_file = (char*)malloc(strlen(dir) + 1 + sizeof("add-to-xpdfrc"));
+    char* config_file = (char*)malloc(strlen(dir) + 1 + sizeof("add-to-xpdfrc") + 1);
     strcpy(config_file, dir);
     strcat(config_file, dirseparator());
     strcat(config_file, "add-to-xpdfrc");