Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
471fa3a8
Commit
471fa3a8
authored
Oct 10, 2008
by
hartman
Browse files
Fix potential static array overflow (CID 40 and 192)
parent
6357ef21
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/demux/ps.h
View file @
471fa3a8
...
...
@@ -344,10 +344,10 @@ static inline int ps_pkt_parse_system( block_t *p_pkt, ps_psm_t *p_psm,
/* Parse a PES (and skip i_skip_extra in the payload) */
static
inline
int
ps_pkt_parse_pes
(
block_t
*
p_pes
,
int
i_skip_extra
)
{
uint8_t
header
[
3
0
];
uint8_t
header
[
3
4
];
unsigned
int
i_skip
=
0
;
memcpy
(
header
,
p_pes
->
p_buffer
,
__MIN
(
p_pes
->
i_buffer
,
3
0
)
);
memcpy
(
header
,
p_pes
->
p_buffer
,
__MIN
(
p_pes
->
i_buffer
,
3
4
)
);
switch
(
header
[
3
]
)
{
...
...
modules/demux/ts.c
View file @
471fa3a8
...
...
@@ -1664,7 +1664,7 @@ static void PIDClean( es_out_t *out, ts_pid_t *pid )
static
void
ParsePES
(
demux_t
*
p_demux
,
ts_pid_t
*
pid
)
{
block_t
*
p_pes
=
pid
->
es
->
p_pes
;
uint8_t
header
[
3
0
];
uint8_t
header
[
3
4
];
int
i_pes_size
=
0
;
int
i_skip
=
0
;
mtime_t
i_dts
=
-
1
;
...
...
@@ -1679,7 +1679,7 @@ static void ParsePES( demux_t *p_demux, ts_pid_t *pid )
pid
->
es
->
pp_last
=
&
pid
->
es
->
p_pes
;
/* FIXME find real max size */
i_max
=
block_ChainExtract
(
p_pes
,
header
,
3
0
);
i_max
=
block_ChainExtract
(
p_pes
,
header
,
3
4
);
if
(
header
[
0
]
!=
0
||
header
[
1
]
!=
0
||
header
[
2
]
!=
1
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment