[vlc-commits] [Git][videolan/vlc][master] contrib: matroska: fix bogus unique_ptr array

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Nov 13 14:25:33 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
6956cb71 by Steve Lhomme at 2025-11-13T13:39:12+00:00
contrib: matroska: fix bogus unique_ptr array

Fixes #29446

- - - - -


1 changed file:

- contrib/src/matroska/0001-KaxBlock-fix-leak-when-reading-EBML-lace-is-aborted.patch


Changes:

=====================================
contrib/src/matroska/0001-KaxBlock-fix-leak-when-reading-EBML-lace-is-aborted.patch
=====================================
@@ -35,7 +35,7 @@ index fd37ad5..29073b5 100644
 +          {
              SizeRead = LastBufferSize;
 -            cursor = _tmpBuf = new binary[FrameNum*4]; /// \warning assume the mean size will be coded in less than 4 bytes
-+            auto _tmpBuf = std::make_unique<binary>(FrameNum*4); /// \warning assume the mean size will be coded in less than 4 bytes
++            auto _tmpBuf = std::make_unique<binary[]>(FrameNum*4); /// \warning assume the mean size will be coded in less than 4 bytes
 +            cursor = _tmpBuf.get();
              Result += input.read(cursor, FrameNum*4);
              FrameSize = ReadCodedSizeValue(cursor, SizeRead, SizeUnknown);



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/6956cb7184d10ab89d792f1e1b84ac7f0d585c7c

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/6956cb7184d10ab89d792f1e1b84ac7f0d585c7c
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list