#4 lsdvd segfaults on some disks

open
nobody
None
5
2005-07-03
2005-07-03
Mike Nix
No

Looks like this is a simple coding error. Patch follows:

--- lsdvd.c-orig 2005-07-03 15:10:28.000000000 +0800
+++ lsdvd.c 2005-07-03 15:10:43.000000000 +0800
@@ -320,7 +320,7 @@
// PALETTE
if (opt_P) {
dvd_info.titles[j].palette =
malloc(16 * sizeof(int));
- for (i=1; i < 18; i++) {
dvd_info.titles[j].palette[i] = pgc->palette[i]; }
+ for (i=0; i < 17; i++) {
dvd_info.titles[j].palette[i] = pgc->palette[i]; }
} else {
dvd_info.titles[j].palette = NULL;
}

Discussion