[libbluray-devel] decode_logical_volume(): fix OOB read (corrupt input)
Petri Hintukainen
git at videolan.org
Sat Jun 24 19:07:15 CEST 2017
libudfread | branch: master | Petri Hintukainen <phintuka at gmail.com> | Sat Jun 24 20:00:30 2017 +0300| [bc8f0d7d6e7b28ea13cab739a420876af2fd317f] | committer: Petri Hintukainen
decode_logical_volume(): fix OOB read (corrupt input)
> http://git.videolan.org/gitweb.cgi/libudfread.git/?a=commit;h=bc8f0d7d6e7b28ea13cab739a420876af2fd317f
---
src/ecma167.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/ecma167.c b/src/ecma167.c
index 6c71158..9c07c08 100644
--- a/src/ecma167.c
+++ b/src/ecma167.c
@@ -150,6 +150,11 @@ void decode_logical_volume(const uint8_t *p, struct logical_volume_descriptor *l
map_size = sizeof(lvd->partition_map_table);
}
+ /* input size is one block (2048 bytes) */
+ if (map_size > 2048 - 440) {
+ map_size = 2048 - 440;
+ }
+
memcpy(lvd->partition_map_table, p + 440, map_size);
}
More information about the libbluray-devel
mailing list