Small portability fix for strnlen

This commit is contained in:
unknown 2004-06-01 11:51:10 +02:00
parent 36652d0053
commit c4cb7a9b43

View file

@ -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;