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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user