core: fix potential NULL pointer in function gui_color_emphasize
This commit is contained in:
parent
c3c1a63ea8
commit
0110f81e88
@ -13,6 +13,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
|
||||
|
||||
== Version 0.4.4 (under dev)
|
||||
|
||||
* core: fix potential NULL pointer in function gui_color_emphasize
|
||||
* core: use same return code and message in all commands when arguments are
|
||||
wrong/missing
|
||||
* core: add option "-beep" in command /print
|
||||
|
@ -615,7 +615,12 @@ gui_color_emphasize (const char *string,
|
||||
int rc, length_search, length_emphasis, length_result;
|
||||
int pos1, pos2, real_pos1, real_pos2, count_emphasis;
|
||||
|
||||
if (!string && !regex)
|
||||
/* string is required */
|
||||
if (!string)
|
||||
return NULL;
|
||||
|
||||
/* search or regex is required */
|
||||
if (!search && !regex)
|
||||
return NULL;
|
||||
|
||||
color_emphasis = gui_color_get_custom ("emphasis");
|
||||
|
Loading…
x
Reference in New Issue
Block a user