1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 07:16:37 +02:00

core: fix malloc size when building filename of upgrade file

This commit is contained in:
Sebastien Helleu
2014-02-25 09:20:44 +01:00
parent 59f4fe05bc
commit 1aae49a2eb
+1 -1
View File
@@ -197,7 +197,7 @@ upgrade_file_new (const char *filename, int write)
{
/* build name of file */
length = strlen (weechat_home) + 1 + strlen (filename) + 16 + 1;
new_upgrade_file->filename = malloc (length + 1);
new_upgrade_file->filename = malloc (length);
if (!new_upgrade_file->filename)
{
free (new_upgrade_file);