mirror of
https://github.com/tbamud/tbamud.git
synced 2026-04-30 04:41:51 +02:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user