]> granicus.if.org Git - libmatroska/commit
KaxBlock: don't reset potentially unallocated memory
authorSteve Lhomme <robux4@ycbcr.xyz>
Mon, 11 Feb 2019 08:51:30 +0000 (09:51 +0100)
committerSteve Lhomme <robux4@ycbcr.xyz>
Sun, 19 May 2019 08:06:29 +0000 (10:06 +0200)
commit120b7b1ff9728199fbec17d6617fe37421812e7a
tree3749005e8a2234a2cb988c7a13dc2975ff3af868
parente2a9f58f67151361bc563dbf5768c5bbd672889b
KaxBlock: don't reset potentially unallocated memory

When using SCOPE_PARTIAL_DATA the GetBuffer()/Data pointer is never allocated.
If this exception occurs we must not write on NULL pointed data.

When the memory is allocated it doesn't have any use to reset the memory to 0
since SetValueIsSet(false) is called right before, invalidating the buffer.
src/KaxBlock.cpp