[libbluray-devel] Fix possible uninitialized data (corrupt input)

Petri Hintukainen git at videolan.org
Sun Jun 11 16:42:36 CEST 2017


libudfread | branch: master | Petri Hintukainen <phintuka at gmail.com> | Sun Jun 11 17:26:32 2017 +0300| [41da1bba26a95af7a4447e064b808bb5d9953e1a] | committer: Petri Hintukainen

Fix possible uninitialized data (corrupt input)

> http://git.videolan.org/gitweb.cgi/libudfread.git/?a=commit;h=41da1bba26a95af7a4447e064b808bb5d9953e1a
---

 src/udfread.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/udfread.c b/src/udfread.c
index 0e450f3..1f9b4a4 100644
--- a/src/udfread.c
+++ b/src/udfread.c
@@ -387,6 +387,8 @@ static int _search_vds(udfread_block_input *input, int part_number,
 
     udf_trace("reading Volume Descriptor Sequence at lba %u, len %u bytes\n", loc->lba, loc->length);
 
+    memset(vds, 0, sizeof(*vds));
+
     /* parse Volume Descriptor Sequence */
     for (lba = loc->lba; lba < end_lba; lba++) {
 
@@ -465,6 +467,7 @@ static int _validate_logical_volume(const struct logical_volume_descriptor *lvd,
     /* UDF 2.60 2.1.5.2 */
     if (_check_domain_identifier(&lvd->domain_id, lvd_domain_id) < 0) {
         udf_error("unknown Domain ID in Logical Volume Descriptor: %1.22s\n", lvd->domain_id.identifier);
+        return -1;
 
     } else {
 



More information about the libbluray-devel mailing list