[FFmpeg-devel] [PATCH] lavfi/avf_showspectrum: check RDFT contet init.
Michael Niedermayer
michaelni at gmx.at
Sun Aug 3 23:10:54 CEST 2014
On Sun, Aug 03, 2014 at 08:40:36PM +0200, Nicolas George wrote:
> Fix a segfault with large window size.
>
> Signed-off-by: Nicolas George <george at nsup.org>
> ---
> libavfilter/avf_showspectrum.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
> index 7bf3aab..764a000 100644
> --- a/libavfilter/avf_showspectrum.c
> +++ b/libavfilter/avf_showspectrum.c
> @@ -177,6 +177,11 @@ static int config_output(AVFilterLink *outlink)
>
> av_rdft_end(s->rdft);
> s->rdft = av_rdft_init(rdft_bits, DFT_R2C);
> + if (!s->rdft) {
> + av_log(ctx, AV_LOG_ERROR, "Unable to allocate RDFT context. "
> + "Maybe window too high.\n");
> + return AVERROR(EINVAL);
> + }
idependant of the exact error code
LGTM
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The real ebay dictionary, page 1
"Used only once" - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140803/28a40987/attachment.asc>
More information about the ffmpeg-devel
mailing list