From 3a40a0f1e8c3b3f894f4f2e58cc86f61731150e4 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 18 Nov 2012 16:14:31 +0000 Subject: (svn r24754) -Fix [FS#5367]: crash on corrupted savegame --- src/saveload/saveload.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index 625a106ff..4925e51d5 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -1913,7 +1913,7 @@ struct LZOLoadFilter : LoadFilter { if (tmp[0] != lzo_adler32(0, out, size + sizeof(uint32))) SlErrorCorrupt("Bad checksum"); /* Decompress */ - lzo1x_decompress(out + sizeof(uint32) * 1, size, buf, &len, NULL); + lzo1x_decompress_safe(out + sizeof(uint32) * 1, size, buf, &len, NULL); return len; } }; -- cgit v1.2.3-70-g09d2