Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
9cd0bbb7
Commit
9cd0bbb7
authored
Mar 20, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mad: robustify against corrupt byte streams (fixes #10726)
parent
b1123693
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
modules/audio_filter/converter/mpgatofixed32.c
modules/audio_filter/converter/mpgatofixed32.c
+9
-1
No files found.
modules/audio_filter/converter/mpgatofixed32.c
View file @
9cd0bbb7
...
...
@@ -103,6 +103,7 @@ static void DoWork( filter_t * p_filter,
if
(
p_sys
->
i_reject_count
>
0
)
{
reject:
memset
(
p_out_buf
->
p_buffer
,
0
,
p_out_buf
->
i_buffer
);
p_sys
->
i_reject_count
--
;
return
;
...
...
@@ -117,7 +118,14 @@ static void DoWork( filter_t * p_filter,
mad_fixed_t
const
*
p_right
=
p_pcm
->
samples
[
1
];
float
*
p_samples
=
(
float
*
)
p_out_buf
->
p_buffer
;
assert
(
i_samples
==
p_out_buf
->
i_nb_samples
);
if
(
i_samples
!=
p_out_buf
->
i_nb_samples
)
{
msg_Err
(
p_filter
,
"unexpected samples count (corrupt stream?): "
"%u / %u"
,
i_samples
,
p_out_buf
->
i_nb_samples
);
p_sys
->
i_reject_count
=
3
;
goto
reject
;
}
/* Interleave and keep buffers in mad_fixed_t format */
if
(
p_pcm
->
channels
==
2
)
{
...
...
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