Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
c9139ee7
Commit
c9139ee7
authored
Oct 14, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/codec/dvbsub.c: more sanity checks.
parent
d23171a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
10 deletions
+26
-10
modules/codec/dvbsub.c
modules/codec/dvbsub.c
+26
-10
No files found.
modules/codec/dvbsub.c
View file @
c9139ee7
...
...
@@ -842,6 +842,16 @@ static void decode_object( decoder_t *p_dec, bs_t *s )
p_topfield
=
s
->
p_start
+
bs_pos
(
s
)
/
8
;
p_bottomfield
=
p_topfield
+
i_topfield
;
bs_skip
(
s
,
8
*
(
i_segment_length
-
7
)
);
/* Sanity check */
if
(
i_segment_length
<
i_topfield
+
i_bottomfield
+
7
||
s
->
p_start
+
i_topfield
+
i_bottomfield
>
s
->
p_end
)
{
msg_Dbg
(
p_dec
,
"corrupted object data"
);
return
;
}
for
(
p_region
=
p_sys
->
p_regions
;
p_region
!=
NULL
;
p_region
=
p_region
->
p_next
)
{
...
...
@@ -853,18 +863,24 @@ static void decode_object( decoder_t *p_dec, bs_t *s )
p_region
->
p_object_defs
[
i
].
i_x
,
p_region
->
p_object_defs
[
i
].
i_y
,
p_topfield
,
i_topfield
);
dvbsub_render_pdata
(
p_dec
,
p_region
,
p_region
->
p_object_defs
[
i
].
i_x
,
p_region
->
p_object_defs
[
i
].
i_y
+
1
,
p_bottomfield
,
i_bottomfield
);
if
(
i_bottomfield
)
{
dvbsub_render_pdata
(
p_dec
,
p_region
,
p_region
->
p_object_defs
[
i
].
i_x
,
p_region
->
p_object_defs
[
i
].
i_y
+
1
,
p_bottomfield
,
i_bottomfield
);
}
else
{
/* Duplicate the top field */
dvbsub_render_pdata
(
p_dec
,
p_region
,
p_region
->
p_object_defs
[
i
].
i_x
,
p_region
->
p_object_defs
[
i
].
i_y
+
1
,
p_topfield
,
i_topfield
);
}
}
}
bs_skip
(
s
,
(
i_topfield
+
i_bottomfield
)
*
8
);
/* Check word-alignement */
bs_align
(
s
);
if
(
bs_pos
(
s
)
%
16
)
bs_skip
(
s
,
8
);
}
else
{
...
...
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