Open yzu1103309 opened 1 week ago
I've got Mint Linux on mine, and everytime I even run anything, it segfaults immediately. I haven't had any luck tracking it down yet.
I would recommend compiling it with clang and see if that fixes it. I realize that's not a solution, but I'm curious if that could work.
For getting the dvdread id, I used the same approach that lsdvd did. I honestly don't quite understand what it's doing. If you wanna try that app and see if it crashes as well, that'd be good to know.
I'll look into it though.
Hi,
Firstly, I want to thank you for all the hard work you've done on this project. Both
bluray_info
anddvd_info
are really handy tools in Linux!Issue
When I built and ran
dvd_info
on my system today, I encountered this problem:Several programs seems not working properly, except for
dvd_player
.Using
gdb
to trace the issue, I found that the overflow occurs in the functiondvd_dvdread_id
in dvd_vmg_ifo.c:The size of
dvdread_id
is onlyDVD_DVDREAD_ID + 1
, butsnprintf()
is called with specified size ofDVD_DVDREAD_ID + 1
in each iteration of the loop. When x >= 1, this causes a buffer overflow.Changing the code to the following fixes the issue:
This resolves the issue by limiting the size to 3 per iteration.
After modifying the code, everything works fine on my system.
OS: KDE neon 6.2 (based on Ubuntu 24.04) gcc version: 13.2.0 libdvdread-dev: 6.1.3-1.1build1
Thanks again for creating these amazing programs!
Update
I tried the original code on another Ubuntu 20.04 machine with gcc 9.4.0, and there was no issue. I'm not sure if this problem was caused by changes in the C standard library implementation?