projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3387d3
)
added warning when loading Supaplex demo that exceeds maximum demo size
author
Holger Schemel
<info@artsoft.org>
Mon, 8 Jan 2018 15:28:57 +0000
(16:28 +0100)
committer
Holger Schemel
<info@artsoft.org>
Mon, 8 Jan 2018 15:34:31 +0000
(16:34 +0100)
src/game_sp/file.c
patch
|
blob
|
history
diff --git
a/src/game_sp/file.c
b/src/game_sp/file.c
index bd1a0fa0833ac43be47f3bf8ee0bd262719d7d06..9fa3908a8dc8df1e50b6636a5a26e9b8a52ac467 100644
(file)
--- a/
src/game_sp/file.c
+++ b/
src/game_sp/file.c
@@
-257,6
+257,10
@@
static void LoadNativeLevelFromFileStream_SP(File *file, int width, int height,
break;
}
+ if (i >= SP_MAX_TAPE_LEN)
+ Error(ERR_WARN, "SP demo truncated: size exceeds maximum SP demo size %d",
+ SP_MAX_TAPE_LEN);
+
native_sp_level.demo.length = i;
native_sp_level.demo.is_available = (native_sp_level.demo.length > 0);
}