projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dae0338
)
Check if width, height or start index of a list[] is negative
author
PilzAdam
<pilzadam@minetest.net>
Mon, 9 Dec 2013 21:39:24 +0000
(22:39 +0100)
committer
PilzAdam
<pilzadam@minetest.net>
Mon, 9 Dec 2013 21:39:24 +0000
(22:39 +0100)
src/guiFormSpecMenu.cpp
patch
|
blob
|
history
diff --git
a/src/guiFormSpecMenu.cpp
b/src/guiFormSpecMenu.cpp
index 920a7f1f25d0de1279cf2140b2dbbe3192afe9d8..82def7411d199d9c7ca34119b061af60860c8658 100644
(file)
--- a/
src/guiFormSpecMenu.cpp
+++ b/
src/guiFormSpecMenu.cpp
@@
-421,6
+421,12
@@
void GUIFormSpecMenu::parseList(parserData* data,std::string element) {
s32 start_i = 0;
if(startindex != "")
start_i = stoi(startindex);
+
+ if (geom.X < 0 || geom.Y < 0 || start_i < 0) {
+ errorstream<< "Invalid list element: '" << element << "'" << std::endl;
+ return;
+ }
+
if(data->bp_set != 2)
errorstream<<"WARNING: invalid use of list without a size[] element"<<std::endl;
m_inventorylists.push_back(ListDrawSpec(loc, listname, pos, geom, start_i));