void-packages/srcpkgs/aubio/patches/CVE-2017-17555.patch
maxice8 fe4945fcbd aubio: fix a few CVEs
Fixes:
  CVE-2017-17054
  CVE-2017-17554
  CVE-2017-17555
  CVE-2018-14521
  CVE-2018-14522
  CVE-2018-14523
2018-10-05 00:35:42 -03:00

29 lines
990 B
Diff

From 265fe9a2ca606f8b9ae4a110390f26c139c01ad7 Mon Sep 17 00:00:00 2001
From: Paul Brossier <piem@piem.org>
Date: Mon, 6 Aug 2018 15:54:37 +0200
Subject: [PATCH] src/io/source_avcodec.c: give up reading file if number of
channel changes during stream (closes #137)
---
src/io/source_avcodec.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c
index 6d8efa79..7082bc2e 100644
--- src/io/source_avcodec.c
+++ src/io/source_avcodec.c
@@ -425,6 +425,13 @@ void aubio_source_avcodec_readframe(aubio_source_avcodec_t *s, uint_t * read_sam
goto beach;
}
+ if (avFrame->channels != (sint_t)s->input_channels) {
+ AUBIO_WRN ("source_avcodec: trying to read from %d channel(s),"
+ "but configured for %d; is '%s' corrupt?\n", avFrame->channels,
+ s->input_channels, s->path);
+ goto beach;
+ }
+
#ifdef HAVE_AVRESAMPLE
in_linesize = 0;
av_samples_get_buffer_size(&in_linesize, avCodecCtx->channels,