[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:33 2015 -0700| [a097e3da09e8fe8d32115dad8992e4326536e8c5] | 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=a097e3da09e8fe8d32115dad8992e4326536e8c5
---
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 207dbaf..becbaf7 100644
--- a/src/ifo_read.c
+++ b/src/ifo_read.c
@@ -611,7 +611,7 @@ static int ifoRead_VTS(ifo_handle_t *ifofile) {
vtsi_mat_t *vtsi_mat;
int i;
- vtsi_mat = malloc(sizeof(vtsi_mat_t));
+ vtsi_mat = calloc(1, sizeof(vtsi_mat_t));
if(!vtsi_mat)
return 0;
More information about the libdvdnav-devel
mailing list