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>
This commit is contained in:
Thomas Arp
2026-04-21 23:13:20 +02:00
committed by GitHub
parent dbd6bfc103
commit 171381f0ea

View File

@@ -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);