Closed tballison closed 4 years ago
I found an infinite loop via fuzzing in AbstractBox
public void parse(DataSource dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException { this.offset = dataSource.position() - (long)header.remaining(); this.dataSource = dataSource; this.content = ByteBuffer.allocate(CastUtils.l2i(contentSize)); while(this.content.remaining() > 0) { dataSource.read(this.content); }
dataSource.read() can return -1. The code doesn't check for this.
dataSource.read()
Triggering file
testMP4.m4a-5-0-10.gz
Sorry. Not a problem.
I found an infinite loop via fuzzing in AbstractBox
dataSource.read()
can return -1. The code doesn't check for this.