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
5c30ae1a
Commit
5c30ae1a
authored
Nov 11, 2015
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dvdsubdec: Validate the RLE offsets
CC: libav-stable@libav.org
parent
eda18328
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
dvdsubdec.c
libavcodec/dvdsubdec.c
+5
-1
No files found.
libavcodec/dvdsubdec.c
View file @
5c30ae1a
...
...
@@ -178,13 +178,14 @@ static void guess_palette(DVDSubContext* ctx,
static
int
decode_dvd_subtitles
(
DVDSubContext
*
ctx
,
AVSubtitle
*
sub_header
,
const
uint8_t
*
buf
,
int
buf_size
)
{
int
cmd_pos
,
pos
,
cmd
,
x1
,
y1
,
x2
,
y2
,
offset1
,
offset2
,
next_cmd_pos
;
int
cmd_pos
,
pos
,
cmd
,
x1
,
y1
,
x2
,
y2
,
next_cmd_pos
;
int
big_offsets
,
offset_size
,
is_8bit
=
0
;
const
uint8_t
*
yuv_palette
=
0
;
uint8_t
colormap
[
4
]
=
{
0
},
alpha
[
256
]
=
{
0
};
int
date
;
int
i
;
int
is_menu
=
0
;
int64_t
offset1
,
offset2
;
if
(
buf_size
<
10
)
return
-
1
;
...
...
@@ -302,6 +303,9 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header,
}
}
the_end:
if
(
offset1
>=
buf_size
||
offset2
>=
buf_size
)
goto
fail
;
if
(
offset1
>=
0
)
{
int
w
,
h
;
uint8_t
*
bitmap
;
...
...
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