File 0001-CVE-2017-14633-Don-t-allow-for-more-than-256-channel.patch of Package libvorbis.7353

From a79ec216cd119069c68b8f3542c6a425a74ab993 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
Date: Tue, 31 Oct 2017 18:32:46 +0100
Subject: [PATCH] CVE-2017-14633: Don't allow for more than 256 channels

Otherwise

 for(i=0;i<vi->channels;i++){
      /* the encoder setup assumes that all the modes used by any
         specific bitrate tweaking use the same floor */
      int submap=info->chmuxlist[i];

overreads later in mapping0_forward since chmuxlist is a fixed array of
256 elements max.
---
 lib/info.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/lib/info.c
+++ b/lib/info.c
@@ -578,7 +578,7 @@ int vorbis_analysis_headerout(vorbis_dsp
   oggpack_buffer opb;
   private_state *b=v->backend_state;
 
-  if(!b){
+  if(!b||vi->channels<=0||vi->channels>256){
     ret=OV_EFAULT;
     goto err_out;
   }
openSUSE Build Service is sponsored by