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