[libdvdnav-devel] Use calloc as a safety measure since ifoRead functions populate parts of the data independently
Steve Dibb
git at videolan.org
Wed Jan 21 17:23:11 CET 2015
libdvdread | branch: master | Steve Dibb <steve.dibb at gmail.com> | Thu Jan 15 13:45:32 2015 -0700| [a267a3bc899a72712baab8bc37fe59405dcd1904] | committer: Jean-Baptiste Kempf
Use calloc as a safety measure since ifoRead functions populate parts of the data independently
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/libdvdread.git/?a=commit;h=a267a3bc899a72712baab8bc37fe59405dcd1904
---
src/ifo_read.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ifo_read.c b/src/ifo_read.c
index 2033a29..207dbaf 100644
--- a/src/ifo_read.c
+++ b/src/ifo_read.c
@@ -517,7 +517,7 @@ void ifoClose(ifo_handle_t *ifofile) {
static int ifoRead_VMG(ifo_handle_t *ifofile) {
vmgi_mat_t *vmgi_mat;
- vmgi_mat = malloc(sizeof(vmgi_mat_t));
+ vmgi_mat = calloc(1, sizeof(vmgi_mat_t));
if(!vmgi_mat)
return 0;
More information about the libdvdnav-devel
mailing list