Branimir Karadžić 9 years ago
parent
commit
83e98ee114
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/os.cpp

+ 2 - 2
src/os.cpp

@@ -232,7 +232,7 @@ namespace bx
 		bool result = false;
 		if (NULL != ptr)
 		{
-			len = (uint32_t)strlen(ptr);
+			len = (uint32_t)strnlen(ptr);
 
 			result = len != 0 && len < *_inOutSize;
 			if (len < *_inOutSize)
@@ -415,7 +415,7 @@ namespace bx
 		int32_t total = 0;
 		for (uint32_t ii = 0; NULL != _argv[ii]; ++ii)
 		{
-			total += (int32_t)strlen(_argv[ii]) + 1;
+			total += (int32_t)strnlen(_argv[ii]) + 1;
 		}
 
 		char* temp = (char*)alloca(total);