Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
46020239
Commit
46020239
authored
Feb 23, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed invalid accesses in decoder with corrupted subtitles streams.
parent
bee1e640
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
modules/codec/subtitles/subsdec.c
modules/codec/subtitles/subsdec.c
+10
-5
No files found.
modules/codec/subtitles/subsdec.c
View file @
46020239
...
...
@@ -435,10 +435,11 @@ static subpicture_t *ParseText( decoder_t *p_dec, block_t *p_block )
}
/* Should be resiliant against bad subtitles */
psz_subtitle
=
strndup
(
(
const
char
*
)
p_block
->
p_buffer
,
p_block
->
i_buffer
);
psz_subtitle
=
malloc
(
p_block
->
i_buffer
+
1
);
if
(
psz_subtitle
==
NULL
)
return
NULL
;
memcpy
(
psz_subtitle
,
p_block
->
p_buffer
,
p_block
->
i_buffer
);
psz_subtitle
[
p_block
->
i_buffer
]
=
'\0'
;
if
(
p_sys
->
iconv_handle
==
(
vlc_iconv_t
)
-
1
)
{
...
...
@@ -794,9 +795,13 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle )
if
(
psz_attribs
[
k
]
==
NULL
)
{
/* Jump over unrecognised tag */
int
i_len
=
strcspn
(
psz_subtitle
,
"
\"
"
)
+
1
;
i_len
+=
strcspn
(
psz_subtitle
+
i_len
,
"
\"
"
)
+
1
;
int
i_len
=
strcspn
(
psz_subtitle
,
"
\"
"
);
if
(
psz_subtitle
[
i_len
]
==
'\"'
)
{
i_len
+=
1
+
strcspn
(
&
psz_subtitle
[
i_len
+
1
],
"
\"
"
);
if
(
psz_subtitle
[
i_len
]
==
'\"'
)
i_len
++
;
}
psz_subtitle
+=
i_len
;
}
while
(
*
psz_subtitle
==
' '
)
...
...
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