Browse Source

engine: common: lib_common: fix offset by one UB

pull/2/head
Alibek Omarov 1 year ago
parent
commit
fb0f184d6b
  1. 4
      engine/common/lib_common.c

4
engine/common/lib_common.c

@ -410,11 +410,13 @@ char **COM_ConvertToLocalPlatform( EFunctionMangleType to, const char *from, siz @@ -410,11 +410,13 @@ char **COM_ConvertToLocalPlatform( EFunctionMangleType to, const char *from, siz
if( at ) len = (uint)( at - prev );
else len = (uint)Q_strlen( prev );
Q_strncpy( symbols[i], prev, Q_min( len + 1, sizeof( symbols[i] )));
prev = at + 1;
if( !at )
break;
prev = at + 1;
}
if( i == MAX_NESTED_NAMESPACES )

Loading…
Cancel
Save