From 519d998fdec7feff3ec14876ab4c077759e374e4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Feb 2016 18:31:37 +0300 Subject: Fix possible variables overflow. --- src/utils/mkdir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils') 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 '/' -- cgit v1.2.3-70-g09d2