mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(PK): filename sanity check.
This commit is contained in:
@@ -67,7 +67,7 @@ namespace GameRes.Formats.Banana // namespace is arbitrary, actual format source
|
|||||||
for (int j = 0; j < name_length; ++j)
|
for (int j = 0; j < name_length; ++j)
|
||||||
{
|
{
|
||||||
name_buffer[j] -= key--;
|
name_buffer[j] -= key--;
|
||||||
if (name_buffer[j] < 0x20)
|
if (name_buffer[j] < 0x20 || name_buffer[j] >= 0xFD)
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
string name = Encodings.cp932.GetString (name_buffer, 0, name_length);
|
string name = Encodings.cp932.GetString (name_buffer, 0, name_length);
|
||||||
|
|||||||
Reference in New Issue
Block a user