[libbluray-devel] Fix integer overflow
hpi1
git at videolan.org
Mon Jun 26 15:26:37 CEST 2017
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Jun 26 16:08:13 2017 +0300| [acb101a0c49f231d08bdbeae16b3ff157b170b1b] | committer: hpi1
Fix integer overflow
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=acb101a0c49f231d08bdbeae16b3ff157b170b1b
---
src/libbluray/bdnav/mpls_parse.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libbluray/bdnav/mpls_parse.c b/src/libbluray/bdnav/mpls_parse.c
index 82b61854..9b92253b 100644
--- a/src/libbluray/bdnav/mpls_parse.c
+++ b/src/libbluray/bdnav/mpls_parse.c
@@ -639,8 +639,8 @@ _parse_playlistmark(BITSTREAM *bits, MPLS_PL *pl)
// length field
len = bs_read(bits, 32);
- if (bs_avail(bits) < len * 8) {
- BD_DEBUG(DBG_NAV | DBG_CRIT, "_parse_playlistmark: unexpected end of file\n");
+ if (bs_avail(bits)/8 < len) {
+ BD_DEBUG(DBG_NAV | DBG_CRIT, "_parse_playlistmark: unexpected EOF\n");
return 0;
}
More information about the libbluray-devel
mailing list