sandflow / regxmllib

Convert MXF to XML: RegXML (SMPTE ST 2001-1) tools and libraries
BSD 2-Clause "Simplified" License
35 stars 14 forks source link

Memory leak in KLVStream.cpp #129

Closed ErikCJohansson closed 6 years ago

ErikCJohansson commented 6 years ago

The function readBERLength allocates up to 8 bytes which are never free'd. Propose to use a fixed buffer size of 8 bytes instead.

patch.gz

palemieux commented 6 years ago

Yes. Offending line: https://github.com/sandflow/regxmllib/blob/106a26a504871e8a614a0cdfce6d756b5315b734/regxmllib/src/main/cpp/com/sandflow/smpte/klv/KLVStream.cpp#L105

palemieux commented 6 years ago

@ErikCJohansson Please review the PR at https://github.com/sandflow/regxmllib/pull/131