mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2025-02-17 12:36:20 +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];
|
char tmp[64];
|
||||||
strncpy(tmp, the_title, 64);
|
strncpy(tmp, the_title, sizeof(tmp) - 1);
|
||||||
|
tmp[sizeof(tmp) - 1] = '\0';
|
||||||
title=tmp;
|
title=tmp;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user