summaryrefslogtreecommitdiff
path: root/audio/libvorbis/patches/patch-lib_vorbisenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/libvorbis/patches/patch-lib_vorbisenc.c')
-rw-r--r--audio/libvorbis/patches/patch-lib_vorbisenc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/audio/libvorbis/patches/patch-lib_vorbisenc.c b/audio/libvorbis/patches/patch-lib_vorbisenc.c
new file mode 100644
index 00000000000..25d367f5d74
--- /dev/null
+++ b/audio/libvorbis/patches/patch-lib_vorbisenc.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-lib_vorbisenc.c,v 1.1 2018/08/06 13:25:38 snj Exp $
+
+https://gitlab.xiph.org/xiph/vorbis/issues/2335
+
+--- lib/vorbisenc.c.orig 2018-08-06 06:17:42.209959046 -0700
++++ lib/vorbisenc.c 2018-08-06 06:18:01.425700460 -0700
+@@ -684,6 +684,7 @@ int vorbis_encode_setup_init(vorbis_info
+ highlevel_encode_setup *hi=&ci->hi;
+
+ if(ci==NULL)return(OV_EINVAL);
++ if(vi->channels<1||vi->channels>255)return(OV_EINVAL);
+ if(!hi->impulse_block_p)i0=1;
+
+ /* too low/high an ATH floater is nonsensical, but doesn't break anything */