summaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2005-05-25 17:07:53 +0000
committerdrochner <drochner@pkgsrc.org>2005-05-25 17:07:53 +0000
commit962c75685c2851faf0993b4dbaa846e1f3c4fc68 (patch)
tree5f5b9ea7c45aad49f2a06a1fc74504359fd5f812 /multimedia
parent258daca9858fda2daf522242f5f6d2251e6a0e2b (diff)
downloadpkgsrc-962c75685c2851faf0993b4dbaa846e1f3c4fc68.tar.gz
fix some memory allocation bugs, from libdvdread CVS, and two memory
leaks, reported by Xiaoyu Fang to the ogle-devel mailing list bump PKGREVISION
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/libdvdread/Makefile4
-rw-r--r--multimedia/libdvdread/distinfo4
-rw-r--r--multimedia/libdvdread/patches/patch-ad22
-rw-r--r--multimedia/libdvdread/patches/patch-ae35
4 files changed, 62 insertions, 3 deletions
diff --git a/multimedia/libdvdread/Makefile b/multimedia/libdvdread/Makefile
index 431c141322b..2b21567b094 100644
--- a/multimedia/libdvdread/Makefile
+++ b/multimedia/libdvdread/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.7 2005/05/22 20:08:20 jlam Exp $
+# $NetBSD: Makefile,v 1.8 2005/05/25 17:07:53 drochner Exp $
DISTNAME= libdvdread-0.9.4
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= multimedia
MASTER_SITES= http://www.dtek.chalmers.se/groups/dvd/dist/
diff --git a/multimedia/libdvdread/distinfo b/multimedia/libdvdread/distinfo
index 45d0cff17b7..05300f5ef16 100644
--- a/multimedia/libdvdread/distinfo
+++ b/multimedia/libdvdread/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2005/03/10 14:21:44 tv Exp $
+$NetBSD: distinfo,v 1.6 2005/05/25 17:07:53 drochner Exp $
SHA1 (libdvdread-0.9.4.tar.gz) = a4b626e49ba8bd33857693c3abe8b34196bc3360
RMD160 (libdvdread-0.9.4.tar.gz) = 9f7f82e14fb5d458686e5cb2e5f364bad19dd08e
@@ -6,3 +6,5 @@ Size (libdvdread-0.9.4.tar.gz) = 256858 bytes
SHA1 (patch-aa) = d97d18c6e1ad445ed7d8e1cdb990ca58ed2d3ef9
SHA1 (patch-ab) = a86a639adf22fe17c98db059e3fa542d0424d468
SHA1 (patch-ac) = 971dc8802bf8f815821e8ad5f279a5148fcf26f7
+SHA1 (patch-ad) = f6d44ffc3434e79499a807daa8daa7f22eba54ab
+SHA1 (patch-ae) = 99d296d4c1c49f1ff4747109dfc8b3d07647ffc4
diff --git a/multimedia/libdvdread/patches/patch-ad b/multimedia/libdvdread/patches/patch-ad
new file mode 100644
index 00000000000..8df79b44a7a
--- /dev/null
+++ b/multimedia/libdvdread/patches/patch-ad
@@ -0,0 +1,22 @@
+$NetBSD: patch-ad,v 1.1 2005/05/25 17:07:53 drochner Exp $
+
+--- dvdread/dvd_input.c.orig 2005-05-24 18:41:21.000000000 +0200
++++ dvdread/dvd_input.c
+@@ -74,7 +74,7 @@ static dvd_input_t css_open(const char *
+ dvd_input_t dev;
+
+ /* Allocate the handle structure */
+- dev = (dvd_input_t) malloc(sizeof(dvd_input_t));
++ dev = (dvd_input_t) malloc(sizeof(struct dvd_input_s));
+ if(dev == NULL) {
+ fprintf(stderr, "libdvdread: Could not allocate memory.\n");
+ return NULL;
+@@ -154,7 +154,7 @@ static dvd_input_t file_open(const char
+ dvd_input_t dev;
+
+ /* Allocate the library structure */
+- dev = (dvd_input_t) malloc(sizeof(dvd_input_t));
++ dev = (dvd_input_t) malloc(sizeof(struct dvd_input_s));
+ if(dev == NULL) {
+ fprintf(stderr, "libdvdread: Could not allocate memory.\n");
+ return NULL;
diff --git a/multimedia/libdvdread/patches/patch-ae b/multimedia/libdvdread/patches/patch-ae
new file mode 100644
index 00000000000..877fd234335
--- /dev/null
+++ b/multimedia/libdvdread/patches/patch-ae
@@ -0,0 +1,35 @@
+$NetBSD: patch-ae,v 1.1 2005/05/25 17:07:53 drochner Exp $
+
+--- dvdread/ifo_read.c.orig 2003-01-17 21:49:16.000000000 +0100
++++ dvdread/ifo_read.c
+@@ -257,6 +257,7 @@ void ifoClose(ifo_handle_t *ifofile) {
+ ifoFree_FP_PGC(ifofile);
+ ifoFree_PGCIT(ifofile);
+ ifoFree_VTS_PTT_SRPT(ifofile);
++ ifoFree_VTS_TMAPT(ifofile);
+
+ if(ifofile->vmgi_mat)
+ free(ifofile->vmgi_mat);
+@@ -1624,8 +1625,8 @@ static int ifoRead_PGCIT_internal(ifo_ha
+ }
+ ptr = data;
+ for(i = 0; i < pgcit->nr_of_pgci_srp; i++) {
+- memcpy(&pgcit->pgci_srp[i], ptr, PGCI_LU_SIZE);
+- ptr += PGCI_LU_SIZE;
++ memcpy(&pgcit->pgci_srp[i], ptr, PGCI_SRP_SIZE);
++ ptr += PGCI_SRP_SIZE;
+ B2N_16(pgcit->pgci_srp[i].ptl_id_mask);
+ B2N_32(pgcit->pgci_srp[i].pgc_start_byte);
+ CHECK_VALUE(pgcit->pgci_srp[i].unknown1 == 0);
+@@ -1663,8 +1664,10 @@ static int ifoRead_PGCIT_internal(ifo_ha
+ static void ifoFree_PGCIT_internal(pgcit_t *pgcit) {
+ if(pgcit) {
+ int i;
+- for(i = 0; i < pgcit->nr_of_pgci_srp; i++)
++ for(i = 0; i < pgcit->nr_of_pgci_srp; i++) {
+ ifoFree_PGC(pgcit->pgci_srp[i].pgc);
++ free(pgcit->pgci_srp[i].pgc);
++ }
+ free(pgcit->pgci_srp);
+ }
+ }