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
96a6323f
Commit
96a6323f
authored
Jul 19, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed buffer overread in equalizer BandCallback.
parent
36d1d663
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
modules/audio_filter/equalizer.c
modules/audio_filter/equalizer.c
+18
-14
No files found.
modules/audio_filter/equalizer.c
View file @
96a6323f
...
...
@@ -546,29 +546,33 @@ static int BandsCallback( vlc_object_t *p_this, char const *psz_cmd,
VLC_UNUSED
(
p_this
);
VLC_UNUSED
(
psz_cmd
);
VLC_UNUSED
(
oldval
);
aout_filter_sys_t
*
p_sys
=
(
aout_filter_sys_t
*
)
p_data
;
char
*
psz_bands
=
newval
.
psz_string
;
char
*
psz_next
;
char
*
p
=
psz_bands
;
int
i
;
/* Same thing for bands */
if
(
*
psz_bands
)
for
(
i
=
0
;
i
<
p_sys
->
i_band
;
i
++
)
{
char
*
p
=
psz_bands
,
*
p_next
;
int
i
;
float
f
;
for
(
i
=
0
;
i
<
p_sys
->
i_band
;
i
++
)
{
/* Read dB -20/20 */
if
(
*
psz_bands
==
'\0'
)
break
;
/* Read dB -20/20 */
#ifdef HAVE_STRTOF
float
f
=
strtof
(
p
,
&
p
_next
);
f
=
strtof
(
p
,
&
psz
_next
);
#else
float
f
=
(
float
)
strtod
(
p
,
&
p
_next
);
f
=
(
float
)
strtod
(
p
,
&
psz
_next
);
#endif
if
(
!
p_next
||
p_next
==
p
)
break
;
/* strtof() failed */
if
(
psz_next
==
p
)
break
;
/* no conversion */
p_sys
->
f_amp
[
i
]
=
EqzConvertdB
(
f
);
p_sys
->
f_amp
[
i
]
=
EqzConvertdB
(
f
);
if
(
!*
p
)
break
;
/* end of line */
p
=
p_next
+
1
;
}
if
(
*
psz_next
==
'\0'
)
break
;
/* end of line */
p
=
&
psz_next
[
1
];
}
return
VLC_SUCCESS
;
}
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