Project

General

Profile

Bug #2161 » 0002-savegame-Fix-Heap-Buffer-Overflow-in-worklist_load.patch

S2_6 - Marko Lindqvist, 08/25/2026 03:38 AM

View differences:

server/savegame2.c
worklist_init(pwl);
pwl->length = secfile_lookup_int_default(file, 0,
"%s.wl_length", path_str);
if (pwl->length > MAX_LEN_WORKLIST) {
log_sg("worklist length %d, while max worklist length %d.",
pwl->length, MAX_LEN_WORKLIST);
pwl->length = MAX_LEN_WORKLIST;
}
for (i = 0; i < pwl->length; i++) {
kind = secfile_lookup_str(file, "%s.wl_kind%d", path_str, i);
(3-3/5)