1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 13:56:37 +02:00

core: fix zero-length malloc of an hashtable item with type "buffer"

This commit is contained in:
Sébastien Helleu
2014-08-10 13:42:48 +02:00
parent ccf18f4bf6
commit 068776b5a7
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -15,6 +15,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
== Version 1.0 (under dev)
* core: fix zero-length malloc of an hashtable item with type "buffer"
* core: fix memory leak on /upgrade when file signature in upgrade file is
invalid
* core: fix memory leak in completion of config options values
+1 -1
View File
@@ -270,7 +270,7 @@ hashtable_alloc_type (enum t_hashtable_type type,
*size = sizeof (void *);
break;
case HASHTABLE_BUFFER:
if (value)
if (value && (size_value > 0))
{
*pointer = malloc (size_value);
if (*pointer)