mirror of
https://github.com/GerbilSoft/rom-properties.git
synced 2025-06-18 19:45:41 -04:00
[libromdata] GdiReaderPrivate::parseGdiFile(): Adjust the track check so we don't go over 127.
Similar to a change made in the previous CDI commit.
This commit is contained in:
parent
f86758b502
commit
21e2bc3f0d
@ -219,8 +219,8 @@ int GdiReaderPrivate::parseGdiFile(char *gdibuf)
|
||||
|
||||
// Save the track information.
|
||||
const size_t idx = blockRanges.size();
|
||||
assert(idx <= std::numeric_limits<int8_t>::max());
|
||||
if (idx > std::numeric_limits<int8_t>::max()) {
|
||||
assert(idx < std::numeric_limits<int8_t>::max());
|
||||
if (idx >= std::numeric_limits<int8_t>::max()) {
|
||||
// Too many tracks. (More than 127???)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user