core: fix crash in evaluation of expression when reading a string in hdata with a NULL value (bug #39419)

This commit is contained in:
Sebastien Helleu 2013-07-08 08:28:27 +02:00
parent d38d033ce7
commit 3744787ec0
2 changed files with 5 additions and 2 deletions

View File

@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
v0.4.2-dev, 2013-07-02
v0.4.2-dev, 2013-07-08
This document lists all changes for each version.
@ -14,6 +14,8 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
Version 0.4.2 (under dev!)
--------------------------
* core: fix crash in evaluation of expression when reading a string in hdata
with a NULL value (bug #39419)
* core: fix display bugs with some UTF-8 chars that truncates messages displayed
(for example U+26C4)
* core: update man page and add translations (in french, german, italian, and

View File

@ -126,7 +126,8 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path)
value = strdup (str_value);
break;
case WEECHAT_HDATA_STRING:
value = strdup (hdata_string (hdata, pointer, var_name));
ptr_value = hdata_string (hdata, pointer, var_name);
value = (ptr_value) ? strdup (ptr_value) : NULL;
break;
case WEECHAT_HDATA_POINTER:
pointer = hdata_pointer (hdata, pointer, var_name);