fix buffer overrun act.informative.c (#146)
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:
@@ -1950,7 +1950,8 @@ ACMD(do_toggle)
|
|||||||
if (!GET_WIMP_LEV(ch))
|
if (!GET_WIMP_LEV(ch))
|
||||||
strcpy(buf2, "OFF"); /* strcpy: OK */
|
strcpy(buf2, "OFF"); /* strcpy: OK */
|
||||||
else
|
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) {
|
if (GET_LEVEL(ch) == LVL_IMPL) {
|
||||||
send_to_char(ch,
|
send_to_char(ch,
|
||||||
|
|||||||
Reference in New Issue
Block a user