diff options
Diffstat (limited to 'misc.c')
-rw-r--r-- | misc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1129,7 +1129,8 @@ gen_path (const char *directory, const char *filename, struct gc_arena *gc) #endif ) { - struct buffer out = alloc_buf_gc (256, gc); + const size_t outsize = strlen(safe_filename) + (directory ? strlen (directory) : 0) + 16; + struct buffer out = alloc_buf_gc (outsize, gc); char dirsep[2]; dirsep[0] = OS_SPECIFIC_DIRSEP; |