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