summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-08 18:31:37 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-08 18:31:37 +0300
commit519d998fdec7feff3ec14876ab4c077759e374e4 (patch)
tree257065b6012f1da3db8d15a7adf4c7864a1133bd /src/utils
parent6fa6509bff3e0f761d8dc8979a17b190c482ae72 (diff)
downloadmanaplus-519d998fdec7feff3ec14876ab4c077759e374e4.tar.gz
manaplus-519d998fdec7feff3ec14876ab4c077759e374e4.tar.bz2
manaplus-519d998fdec7feff3ec14876ab4c077759e374e4.tar.xz
manaplus-519d998fdec7feff3ec14876ab4c077759e374e4.zip
Fix possible variables overflow.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/mkdir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/mkdir.cpp b/src/utils/mkdir.cpp
index f7a2aba37..25a8ba521 100644
--- a/src/utils/mkdir.cpp
+++ b/src/utils/mkdir.cpp
@@ -54,7 +54,7 @@ int mkdir_r(const char *const pathname)
const int len = CAST_S32(strlen(tmp));
- if (len < 1)
+ if (len < 1 || len >= INT_MAX)
return -1;
// terminate the pathname with '/'