fix buffer overrun act.informative.c

Ref https://www.tbamud.com/kunena/4-development/5636-bug-in-do-toggle-in-act-informative-c#10540

Thanks to Ironfist for the fix
This commit is contained in:
Thomas Arp 2025-02-19 21:17:22 +01:00 committed by GitHub
parent 5024dd8e66
commit a1a7bf5d7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1950,7 +1950,8 @@ ACMD(do_toggle)
if (!GET_WIMP_LEV(ch))
strcpy(buf2, "OFF"); /* strcpy: OK */
else
sprintf(buf2, "%-3.3d", GET_WIMP_LEV(ch)); /* sprintf: OK */
snprintf(buf2, sizeof(buf2), "%-3.3d", GET_WIMP_LEV(ch)); /* thanks to Ironfist for the fix for the buffer overrun here */
if (GET_LEVEL(ch) == LVL_IMPL) {
send_to_char(ch,