mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-23 19:59:16 +01:00
Ensure that long game titles are NUL-terminated
This commit is contained in:
parent
343e988de0
commit
cc78e4cae7
@ -480,7 +480,8 @@ bool GameTDB::FindTitle(char * data, string & title, string langCode)
|
||||
}
|
||||
|
||||
char tmp[64];
|
||||
strncpy(tmp, the_title, 64);
|
||||
strncpy(tmp, the_title, sizeof(tmp) - 1);
|
||||
tmp[sizeof(tmp) - 1] = '\0';
|
||||
title=tmp;
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user