Skip to content

Commit 1be2ba8

Browse files
authored
Replace single strncpy with strlcpy in features_cpu (#18400)
1 parent 01cc7b3 commit 1be2ba8

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

libretro-common/features/features_cpu.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -919,8 +919,7 @@ void cpu_features_get_model_name(char *s, int len)
919919

920920
if (model_name)
921921
{
922-
strncpy(s, model_name, len);
923-
s[len - 1] = '\0';
922+
strlcpy(s, model_name, len);
924923
}
925924
}
926925
#endif

0 commit comments

Comments
 (0)