Skip to content

wavparse: adtl/note/labl chunk parsing fixes

Found while looking at !993 (merged)

wavparse: guard against overflow when comparing chunk sizes

Could be rewritten as lsize > (size - 8) a well, but the
extra check seems clearer. Doesn't look like it was problematic,
lsize wasn't actually used when parsing the sub-chunks.
wavparse: clean up adtl/note/labl chunk parsing

We were passing the size of the adtl chunk to the note/labl
sub-chunk parsing function, which means we may memdup lots of
data after the chunk string's NUL terminator that doesn't
really belong to it.
wavparse: use g_strndup() for copying text data

So we don't rely on NUL terminators inside the data.

Merge request reports