Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
c55b595d by Steve Lhomme at 2026-01-08T18:57:39+00:00
demux: mkv: fix potential input buffer overrun
Ref. #29516 which I can't reproduce but seems to point there.
- - - - -
1 changed file:
- modules/demux/mkv/lzokay.cpp
Changes:
=====================================
modules/demux/mkv/lzokay.cpp
=====================================
@@ -48,7 +48,11 @@ constexpr std::size_t Max255Count =
std::numeric_limits<size_t>::max() / 255 - 2
std::size_t offset; \
{ \
const uint8_t *old_inp = inp; \
- while (*inp == 0) ++inp; \
+ while (inp < inp_end && *inp == 0) ++inp; \
+ if (inp >= inp_end) { \
+ dst_size = outp - dst; \
+ return EResult::InputOverrun; \
+ } \
offset = inp - old_inp; \
if (offset > Max255Count) { \
dst_size = outp - dst; \
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/c55b595dcc4db7d5d0c9697a9e34394d8a6e6dc2
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/c55b595dcc4db7d5d0c9697a9e34394d8a6e6dc2
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits