diff options
author | Juergen Keil <jkeil@users.sourceforge.net> | 2002-09-04 16:06:18 +0000 |
---|---|---|
committer | Juergen Keil <jkeil@users.sourceforge.net> | 2002-09-04 16:06:18 +0000 |
commit | d1010f51a2cb07ba83d71423ab740a5a0c3d0934 (patch) | |
tree | 3d2404b9a26c2dd4271db69bd535723e5d8c7887 /src | |
parent | b4ef048133cf9854ce920bfe355049545b88a017 (diff) | |
download | xine-lib-d1010f51a2cb07ba83d71423ab740a5a0c3d0934.tar.gz xine-lib-d1010f51a2cb07ba83d71423ab740a5a0c3d0934.tar.bz2 |
file_open was allocating too few bytes for dvd_input_t, corrupts malloc heap.xine-0_9_14-norelease0.9.14-norelease
It was using ``sizeof(pointer)'' instead of ``sizeof(structure)''
CVS patchset: 2605
CVS date: 2002/09/04 16:06:18
Diffstat (limited to 'src')
-rw-r--r-- | src/input/libdvdread/dvd_input.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input/libdvdread/dvd_input.c b/src/input/libdvdread/dvd_input.c index c2d788fdb..ccd57dd5a 100644 --- a/src/input/libdvdread/dvd_input.c +++ b/src/input/libdvdread/dvd_input.c @@ -55,7 +55,7 @@ static dvd_input_t css_open(const char *target) dvd_input_t dev; /* Allocate the handle structure */ - dev = (dvd_input_t) malloc(sizeof(dvd_input_t)); + dev = (dvd_input_t) malloc(sizeof(*dev)); if(dev == NULL) { fprintf(stderr, "libdvdread: Could not allocate memory.\n"); return NULL; @@ -134,7 +134,7 @@ static dvd_input_t file_open(const char *target) dvd_input_t dev; /* Allocate the library structure */ - dev = (dvd_input_t) malloc(sizeof(dvd_input_t)); + dev = (dvd_input_t) malloc(sizeof(*dev)); if(dev == NULL) { fprintf(stderr, "libdvdread: Could not allocate memory.\n"); return NULL; |