Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
1b3b018a
Commit
1b3b018a
authored
Mar 16, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mpegts: Fix potential pointer overflows
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
29db8e45
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
mpegts.c
libavformat/mpegts.c
+3
-3
No files found.
libavformat/mpegts.c
View file @
1b3b018a
...
...
@@ -596,7 +596,7 @@ static inline int get16(const uint8_t **pp, const uint8_t *p_end)
int
c
;
p
=
*
pp
;
if
(
(
p
+
1
)
>=
p_end
)
if
(
1
>=
p_end
-
p
)
return
AVERROR_INVALIDDATA
;
c
=
AV_RB16
(
p
);
p
+=
2
;
...
...
@@ -615,7 +615,7 @@ static char *getstr8(const uint8_t **pp, const uint8_t *p_end)
len
=
get8
(
&
p
,
p_end
);
if
(
len
<
0
)
return
NULL
;
if
(
(
p
+
len
)
>
p_end
)
if
(
len
>
p_end
-
p
)
return
NULL
;
str
=
av_malloc
(
len
+
1
);
if
(
!
str
)
...
...
@@ -2181,7 +2181,7 @@ static int handle_packet(MpegTSContext *ts, const uint8_t *packet)
if
(
is_start
)
{
/* pointer field present */
len
=
*
p
++
;
if
(
p
+
len
>
p_end
)
if
(
len
>
p_end
-
p
)
return
0
;
if
(
len
&&
cc_ok
)
{
/* write remaining section bytes */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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