[libdvdnav-devel] [Git][videolan/libdvdread][master] ifo_read: allocate the right number of PTT

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sat Dec 18 18:53:37 UTC 2021



Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdread


Commits:
c2275508 by Steve Lhomme at 2021-12-18T18:40:04+00:00
ifo_read: allocate the right number of PTT

We were allocating 4x the number of PTTs. We should use the same value as
nr_of_ptts.

- - - - -


1 changed file:

- src/ifo_read.c


Changes:

=====================================
src/ifo_read.c
=====================================
@@ -1240,7 +1240,7 @@ int ifoRead_VTS_PTT_SRPT(ifo_handle_t *ifofile) {
     CHECK_VALUE(n % 4 == 0);
 
     vts_ptt_srpt->title[i].nr_of_ptts = n / 4;
-    vts_ptt_srpt->title[i].ptt = calloc(n, sizeof(ptt_info_t));
+    vts_ptt_srpt->title[i].ptt = calloc(n / 4, sizeof(ptt_info_t));
     if(!vts_ptt_srpt->title[i].ptt) {
       for(n = 0; n < i; n++)
         free(vts_ptt_srpt->title[n].ptt);



View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/commit/c227550889b4455bbfba51099306e78ce81b7df9

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




More information about the libdvdnav-devel mailing list