pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/pkgsrc-2007Q4]: pkgsrc/audio/libsndfile Pullup ticket 2281 - requeste...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ffd93053c540
branches:  pkgsrc-2007Q4
changeset: 537044:ffd93053c540
user:      ghen <ghen%pkgsrc.org@localhost>
date:      Tue Jan 29 14:05:51 2008 +0000

description:
Pullup ticket 2281 - requested by drochner
security fix for libsndfile

- pkgsrc/audio/libsndfile/Makefile                      1.44
- pkgsrc/audio/libsndfile/distinfo                      1.23
- pkgsrc/audio/libsndfile/patches/patch-ba              1.1

   Module Name:    pkgsrc
   Committed By:   drochner
   Date:           Mon Jan  7 17:34:38 UTC 2008

   Modified Files:
           pkgsrc/audio/libsndfile: Makefile distinfo
   Added Files:
           pkgsrc/audio/libsndfile/patches: patch-ba

   Log Message:
   fix CVE-2007-4974 (buffer overflow), patch from Gentoo
   bump PKGREVISION

diffstat:

 audio/libsndfile/Makefile         |   4 +-
 audio/libsndfile/distinfo         |   3 +-
 audio/libsndfile/patches/patch-ba |  40 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 3 deletions(-)

diffs (71 lines):

diff -r 54c5e923745f -r ffd93053c540 audio/libsndfile/Makefile
--- a/audio/libsndfile/Makefile Tue Jan 29 13:54:20 2008 +0000
+++ b/audio/libsndfile/Makefile Tue Jan 29 14:05:51 2008 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.43 2007/11/04 16:00:02 agc Exp $
+# $NetBSD: Makefile,v 1.43.2.1 2008/01/29 14:05:51 ghen Exp $
 
 DISTNAME=      libsndfile-1.0.17
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    audio
 MASTER_SITES=  http://www.mega-nerd.com/libsndfile/
 
diff -r 54c5e923745f -r ffd93053c540 audio/libsndfile/distinfo
--- a/audio/libsndfile/distinfo Tue Jan 29 13:54:20 2008 +0000
+++ b/audio/libsndfile/distinfo Tue Jan 29 14:05:51 2008 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.22 2007/01/07 15:02:16 wiz Exp $
+$NetBSD: distinfo,v 1.22.8.1 2008/01/29 14:05:51 ghen Exp $
 
 SHA1 (libsndfile-1.0.17+flac-1.1.3.patch.bz2) = 10e0d19dfc8cf2a6bf499e0fa0d1ab17dca4c519
 RMD160 (libsndfile-1.0.17+flac-1.1.3.patch.bz2) = fc6e6f03069c1ad8ee43f600f6ac2aa6e97bb1f5
@@ -14,3 +14,4 @@
 SHA1 (patch-af) = 9ac0dd446a2f24c2d39e20063489a3b778fcda36
 SHA1 (patch-ag) = 10d0fcda9377fc6afa2dce9e4782f49889a4f4a3
 SHA1 (patch-ah) = 8c936316ca1191f8893579a562ff705c8dde6f92
+SHA1 (patch-ba) = 92ec08d4e021f121d2255760d601625df71e3805
diff -r 54c5e923745f -r ffd93053c540 audio/libsndfile/patches/patch-ba
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/libsndfile/patches/patch-ba Tue Jan 29 14:05:51 2008 +0000
@@ -0,0 +1,40 @@
+$NetBSD: patch-ba,v 1.1.2.2 2008/01/29 14:05:51 ghen Exp $
+
+--- src/flac.c.orig    2008-01-03 17:13:00.000000000 +0100
++++ src/flac.c
+@@ -57,7 +57,7 @@ flac_open (SF_PRIVATE *psf)
+ ** Private static functions.
+ */
+ 
+-#define ENC_BUFFER_SIZE 4096
++#define ENC_BUFFER_SIZE 8192
+ 
+ typedef enum
+ {     PFLAC_PCM_SHORT = 0,
+@@ -202,6 +202,17 @@ flac_buffer_copy (SF_PRIVATE *psf)
+       const FLAC__int32* const *buffer = pflac->wbuffer ;
+       unsigned i = 0, j, offset ;
+ 
++      /*
++      **      frame->header.blocksize is variable and we're using a constant blocksize
++      **      of FLAC__MAX_BLOCK_SIZE.
++      **      Check our assumptions here.
++      */
++      if (frame->header.blocksize > FLAC__MAX_BLOCK_SIZE)
++      {       psf_log_printf (psf, "Ooops : frame->header.blocksize (%d) > FLAC__MAX_BLOCK_SIZE (%d)\n", __func__, __LINE__, frame->header.blocksize, FLAC__MAX_BLOCK_SIZE) ;
++              psf->error = SFE_INTERNAL ;
++              return 0 ;
++              } ;
++
+       if (pflac->ptr == NULL)
+       {       /*
+               **      Not sure why this code is here and not elsewhere.
+@@ -210,7 +221,7 @@ flac_buffer_copy (SF_PRIVATE *psf)
+               pflac->bufferbackup = SF_TRUE ;
+               for (i = 0 ; i < frame->header.channels ; i++)
+               {       if (pflac->rbuffer [i] == NULL)
+-                              pflac->rbuffer [i] = calloc (frame->header.blocksize, sizeof (FLAC__int32)) ;
++                              pflac->rbuffer [i] = calloc (FLAC__MAX_BLOCK_SIZE, sizeof (FLAC__int32)) ;
+                       memcpy (pflac->rbuffer [i], buffer [i], frame->header.blocksize * sizeof (FLAC__int32)) ;
+                       } ;
+               pflac->wbuffer = (const FLAC__int32* const*) pflac->rbuffer ;



Home | Main Index | Thread Index | Old Index