git.videolan.org
/
vlc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b2b1570
)
mp4: fix integer underflow
author
Rémi Denis-Courmont
<remi@remlab.net>
Thu, 27 Jun 2019 20:19:38 +0000
(23:19 +0300)
committer
Rémi Denis-Courmont
<remi@remlab.net>
Thu, 27 Jun 2019 20:36:58 +0000
(23:36 +0300)
Reported-by: Hyeon-Ju Lee <zorurione@gmail.com>
modules/demux/mp4/mp4.c
patch
|
blob
|
history
diff --git
a/modules/demux/mp4/mp4.c
b/modules/demux/mp4/mp4.c
index
77b46de
..
83f36db
100644
(file)
--- a/
modules/demux/mp4/mp4.c
+++ b/
modules/demux/mp4/mp4.c
@@
-536,10
+536,10
@@
static block_t * MP4_EIA608_Convert( block_t * p_block )
} while( i_bytes >= 2 );
/* cdt2 is optional */
} while( i_bytes >= 2 );
/* cdt2 is optional */
- i
f ( i_remaining >= 10 &&
- (i_bytes = GetDWBE(p_read)) &&
-
(i_bytes <= i_remaining)
&&
-
!memcmp("cdt2", &p_read[4], 4)
)
+ i
_bytes = GetDWBE(p_read);
+
+
if (10 <= i_bytes && i_bytes <= i_remaining
&&
+
!memcmp("cdt2", &p_read[4], 4)
)
{
p_read += 8;
i_bytes -= 8;
{
p_read += 8;
i_bytes -= 8;