diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2018-06-02 15:14:21 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2018-06-02 15:14:21 +0200 |
commit | 39a291bc538a95f650811b08d91056b8353ed81c (patch) | |
tree | 7ab5b950d752205031f0b6ccd4e77a1a74483637 | |
parent | 49253bd4d975d129f2a3e6376173f94adb606da5 (diff) | |
download | weechat-39a291bc538a95f650811b08d91056b8353ed81c.zip |
core: return NULL in function string_cut if string is NULL
-rw-r--r-- | src/core/wee-string.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/wee-string.c b/src/core/wee-string.c index 0bdb2f356..4a2955396 100644 --- a/src/core/wee-string.c +++ b/src/core/wee-string.c @@ -112,6 +112,9 @@ string_cut (const char *string, int length, int count_suffix, int screen, char *result; const char *ptr_string; + if (!string) + return NULL; + if (screen) ptr_string = gui_chat_string_add_offset_screen (string, length); else |