Commit 5f091345 authored by mronstrom@mysql.com's avatar mronstrom@mysql.com

Small portability fix for strnlen

parent e8bd062f
...@@ -673,7 +673,7 @@ ConfigValuesFactory::unpack(const void * _src, Uint32 len){ ...@@ -673,7 +673,7 @@ ConfigValuesFactory::unpack(const void * _src, Uint32 len){
break; break;
case ConfigValues::StringType:{ case ConfigValues::StringType:{
Uint32 s_len = ntohl(* (const Uint32 *)src); src += 4; Uint32 s_len = ntohl(* (const Uint32 *)src); src += 4;
size_t s_len2 = strnlen((const char*)src, s_len); size_t s_len2 = strlen((const char*)src);
if(s_len2 + 1 != s_len){ if(s_len2 + 1 != s_len){
DEBUG abort(); DEBUG abort();
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment