[libdvdnav-devel] [Git][videolan/libdvdnav][master] 2 commits: Check the the title parts read are available
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Mon Aug 11 12:05:10 UTC 2025
Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdnav
Commits:
dc962492 by Steve Lhomme at 2025-08-11T12:02:58+00:00
Check the the title parts read are available
The nr_of_ptts of the VTS and VMGI may differ.
We can't read past the number count of items in title[].
- - - - -
1d2af48d by Steve Lhomme at 2025-08-11T12:02:58+00:00
Fix access to title not found in array
- - - - -
1 changed file:
- src/searching.c
Changes:
=====================================
src/searching.c
=====================================
@@ -667,7 +667,15 @@ uint32_t dvdnav_describe_title_chapters(dvdnav_t *this, int32_t title, uint64_t
parts = ptitle->nr_of_ptts;
if(ptitle->vts_ttn == 0)
goto fail;
+ if (ptitle->vts_ttn > ifo->vts_ptt_srpt->nr_of_srpts) {
+ printerr("Requested title not found.");
+ goto fail;
+ }
ptt = ifo->vts_ptt_srpt->title[ptitle->vts_ttn-1].ptt;
+ if (parts > ifo->vts_ptt_srpt->title[ptitle->vts_ttn-1].nr_of_ptts) {
+ printerr("Too many parts, using the ones available.");
+ parts = ifo->vts_ptt_srpt->title[ptitle->vts_ttn-1].nr_of_ptts;
+ }
tmp = calloc(1, sizeof(uint64_t)*parts);
if(!tmp)
View it on GitLab: https://code.videolan.org/videolan/libdvdnav/-/compare/59831f843728f995f852c4e5762b61a6f7c0d2c3...1d2af48d685911a169fe77d500b1d426910c6f77
--
View it on GitLab: https://code.videolan.org/videolan/libdvdnav/-/compare/59831f843728f995f852c4e5762b61a6f7c0d2c3...1d2af48d685911a169fe77d500b1d426910c6f77
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the libdvdnav-devel
mailing list