bitreader: Simplify & fix a read stack buffer overflow
1 unresolved thread
1 unresolved thread
The current implementation was always reading the next byte, regardless of the buffer size. This commit simplifies the existing code and ensures we never read past the input buffer
Fix #16
Edited by Hugo Beauzée-Luyssen
Merge request reports
Activity
Filter activity
35 36 return 1; 36 37 } 37 38 39 static void dvdread_getbits_refill(getbits_state_t *state) { 40 ++state->byte_position; 41 state->byte = state->start[state->byte_position]; Done.
This goes with the dvdnav counterpart: libdvdnav!25
mentioned in merge request libdvdnav!25
added 6 commits
-
9ab443e4...3ac69796 - 2 commits from branch
videolan:master
- 42c7a6dc - bitreader: Add a minimal test
- efc76220 - bitreader: Simplify & fix a read stack buffer overflow
- 000e15a5 - nav_read: Pass the buffer size as a 3rd parameter
- 4075c6c7 - bitreader: Provide the buffer size
Toggle commit list-
9ab443e4...3ac69796 - 2 commits from branch
mentioned in merge request !27 (merged)
mentioned in merge request !31
mentioned in merge request libdvdnav!50
mentioned in merge request vlc!2377 (closed)