mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-23 18:50:13 +01:00
Fixed a crash bug in oasis_list caused by buffer overflows
This commit is contained in:
parent
debf92811f
commit
170173010b
1 changed files with 6 additions and 1 deletions
|
|
@ -232,7 +232,12 @@ void perform_obj_type_list(struct char_data * ch, char *arg)
|
|||
send_to_char(ch, "Not a valid item type");
|
||||
return;
|
||||
}
|
||||
len += tmp_len;
|
||||
if (len + tmp_len < sizeof(buf) - 1)
|
||||
len += tmp_len;
|
||||
else {
|
||||
buf[sizeof(buf) -1] = '\0';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue