mirror of
https://github.com/tbamud/tbamud.git
synced 2025-09-22 05:50:48 +02:00
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:
parent
5024dd8e66
commit
a1a7bf5d7d
1 changed files with 2 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue