Skip to content

Commit 92844c5

Browse files
scjurgenmackron
authored andcommitted
bext size allocation error
on line 2531 the reader consumes one byte too much (extraBytes + 1). This can cause a DRWAV_ASSERT.
1 parent 9cb7092 commit 92844c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dr_wav.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2811,7 +2811,7 @@ DRWAV_PRIVATE drwav_uint64 drwav__metadata_process_chunk(drwav__metadata_parser*
28112811
return bytesRead;
28122812
}
28132813
allocSizeNeeded += drwav__strlen(buffer) + 1;
2814-
allocSizeNeeded += (size_t)pChunkHeader->sizeInBytes - DRWAV_BEXT_BYTES; /* Coding history. */
2814+
allocSizeNeeded += (size_t)pChunkHeader->sizeInBytes - DRWAV_BEXT_BYTES + 1; /* Coding history. */
28152815

28162816
drwav__metadata_request_extra_memory_for_stage_2(pParser, allocSizeNeeded, 1);
28172817

0 commit comments

Comments
 (0)