diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2025-04-05 14:31:15 +0200 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2025-04-05 14:31:15 +0200 |
commit | eaf33e4caf3dbd77e89ff7cbbc1afe35c529fe84 (patch) | |
tree | f2b800ac60990873f6ef86fad77f36ac450ce147 /FICS | |
parent | 76b068909d5786711ff136d690cb94bb046904b0 (diff) |
t_sft: fixed null pointer pass to strlen()
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/FICS/utils.c b/FICS/utils.c index 4de322a..fd4e8a6 100644 --- a/FICS/utils.c +++ b/FICS/utils.c @@ -967,7 +967,8 @@ PRIVATE void t_sft(const char *want, struct t_tree *t) { if (t) { - int cmp = strncmp(want ? want : "", t->name, strlen(want)); + const char *v_want = (want ? want : ""); + int cmp = strncmp(v_want, t->name, strlen(v_want)); if (cmp <= 0) // If 'want' <= this one, look left t_sft(want, t->left); |