mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-08-17 14:15:34 +08:00
Merge branch 'GP-7131_ryanmkurtz_PR-9452_kaibolay_reasonable-png-chunk-size'
This commit is contained in:
@@ -40,6 +40,9 @@ public class PNGChunk implements StructConverter {
|
||||
*/
|
||||
public PNGChunk(BinaryReader reader) throws IOException {
|
||||
length = reader.readNextInt();
|
||||
if (length < 0 || length > 8 * 1024 * 1024) {
|
||||
throw new IllegalArgumentException("Unreasonable PNG chunk length: " + length);
|
||||
}
|
||||
chunkID = reader.readNextInt();
|
||||
data = reader.readNextByteArray(length);
|
||||
crc32 = reader.readNextInt();
|
||||
|
||||
Reference in New Issue
Block a user