From 171381f0ea9eeca244b12f61fe8133b7d8955033 Mon Sep 17 00:00:00 2001 From: Thomas Arp <357770+welcor@users.noreply.github.com> Date: Tue, 21 Apr 2026 23:13:20 +0200 Subject: [PATCH] Potential fix for code scanning alert no. 5: Redundant null check due to previous dereference (#174) Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- src/improved-edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/improved-edit.c b/src/improved-edit.c index 2312297..b549b54 100644 --- a/src/improved-edit.c +++ b/src/improved-edit.c @@ -421,7 +421,7 @@ void parse_edit_action(int command, char *string, struct descriptor_data *d) strncat(buf, *d->str, sizeof(buf) - strlen(buf) - 1); *s = temp; strncat(buf, buf2, sizeof(buf) - strlen(buf) - 1); - if (s && *s) + if (*s) strncat(buf, s, sizeof(buf) - strlen(buf) - 1); RECREATE(*d->str, char, strlen(buf) + 3);