rubidium - 16 years ago 2008-11-23 13:42:05 rubidium@openttd.org
(svn r14610) -Fix [FS#2415]: possible stack corruption when reading corrupted sprites. -Change: harden the sprite reading routine against corrupt sprites.
3 files changed with 56 insertions and 3 deletions:
DEBUG(sprite, warning_level, "Ignoring %i unused extra bytes from the sprite from %s at position %i", dest_size - sprite->width * sprite->height, FioGetFilename(file_slot), (int)file_pos);
warning_level = 6;
}
dest = dest_orig;
for (int i = 0; i < sprite->width * sprite->height; i++) {