we need some dependencies for prev. patch
This commit is contained in:
parent
ae5575729f
commit
beddd35e08
|
@ -1,17 +1,43 @@
|
|||
diff -U0 libsndfile-1.0.17/ChangeLog.r1610 libsndfile-1.0.17/ChangeLog
|
||||
--- libsndfile-1.0.17/ChangeLog.r1610 2006-08-31 11:39:36.000000000 +0200
|
||||
+++ libsndfile-1.0.17/ChangeLog 2011-07-14 14:32:34.216206494 +0200
|
||||
@@ -0,0 +1,6 @@
|
||||
+++ libsndfile-1.0.17/ChangeLog 2011-07-14 15:20:10.566469047 +0200
|
||||
@@ -0,0 +1,11 @@
|
||||
+2011-07-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
+
|
||||
+ * src/paf.c src/common.h src/sndfile.c
|
||||
+ Fix for Secunia Advisory SA45125, heap overflow (heap gets overwritten with
|
||||
+ byte value of 0) due to integer overflow if PAF file handler.
|
||||
+
|
||||
+2009-03-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
+
|
||||
+ * src/common.h src/caf.c src/sndfile.c
|
||||
+ Add SF_MAX_CHANNELS (set to 256) and use it.
|
||||
+
|
||||
diff -up libsndfile-1.0.17/src/caf.c.r1610 libsndfile-1.0.17/src/caf.c
|
||||
--- libsndfile-1.0.17/src/caf.c.r1610 2011-07-14 15:20:10.550468873 +0200
|
||||
+++ libsndfile-1.0.17/src/caf.c 2011-07-14 15:20:10.567469058 +0200
|
||||
@@ -282,7 +282,7 @@ caf_read_header (SF_PRIVATE *psf)
|
||||
" Frames / packet : %u\n Channels / frame : %u\n Bits / channel : %u\n",
|
||||
desc.fmt_id, desc.fmt_flags, desc.pkt_bytes, desc.pkt_frames, desc.channels_per_frame, desc.bits_per_chan) ;
|
||||
|
||||
- if (desc.channels_per_frame > 200)
|
||||
+ if (desc.channels_per_frame > SF_MAX_CHANNELS)
|
||||
{ psf_log_printf (psf, "**** Bad channels per frame value %u.\n", desc.channels_per_frame) ;
|
||||
return SFE_MALFORMED_FILE ;
|
||||
} ;
|
||||
diff -up libsndfile-1.0.17/src/common.h.r1610 libsndfile-1.0.17/src/common.h
|
||||
--- libsndfile-1.0.17/src/common.h.r1610 2006-08-31 11:22:07.000000000 +0200
|
||||
+++ libsndfile-1.0.17/src/common.h 2011-07-14 14:29:38.309145864 +0200
|
||||
@@ -454,6 +454,7 @@ enum
|
||||
+++ libsndfile-1.0.17/src/common.h 2011-07-14 15:20:10.568469068 +0200
|
||||
@@ -75,6 +75,8 @@
|
||||
#define SF_MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
#define SF_MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
+#define SF_MAX_CHANNELS 256
|
||||
+
|
||||
enum
|
||||
{ /* PEAK chunk location. */
|
||||
SF_PEAK_START = 42,
|
||||
@@ -454,6 +456,7 @@ enum
|
||||
SFE_PAF_VERSION,
|
||||
SFE_PAF_UNKNOWN_FORMAT,
|
||||
SFE_PAF_SHORT_HEADER,
|
||||
|
@ -21,7 +47,7 @@ diff -up libsndfile-1.0.17/src/common.h.r1610 libsndfile-1.0.17/src/common.h
|
|||
SFE_SVX_NO_BODY,
|
||||
diff -up libsndfile-1.0.17/src/paf.c.r1610 libsndfile-1.0.17/src/paf.c
|
||||
--- libsndfile-1.0.17/src/paf.c.r1610 2006-08-31 11:22:07.000000000 +0200
|
||||
+++ libsndfile-1.0.17/src/paf.c 2011-07-14 14:29:38.309145864 +0200
|
||||
+++ libsndfile-1.0.17/src/paf.c 2011-07-14 15:20:10.559468971 +0200
|
||||
@@ -163,6 +163,9 @@ paf_read_header (SF_PRIVATE *psf)
|
||||
{ PAF_FMT paf_fmt ;
|
||||
int marker ;
|
||||
|
@ -45,7 +71,7 @@ diff -up libsndfile-1.0.17/src/paf.c.r1610 libsndfile-1.0.17/src/paf.c
|
|||
|
||||
diff -up libsndfile-1.0.17/src/sndfile.c.r1610 libsndfile-1.0.17/src/sndfile.c
|
||||
--- libsndfile-1.0.17/src/sndfile.c.r1610 2006-08-31 11:22:07.000000000 +0200
|
||||
+++ libsndfile-1.0.17/src/sndfile.c 2011-07-14 14:29:38.311145864 +0200
|
||||
+++ libsndfile-1.0.17/src/sndfile.c 2011-07-14 15:20:10.571469100 +0200
|
||||
@@ -146,6 +146,7 @@ ErrorStruct SndfileErrors [] =
|
||||
{ SFE_PAF_VERSION , "Error in PAF file, bad version." },
|
||||
{ SFE_PAF_UNKNOWN_FORMAT , "Error in PAF file, unknown format." },
|
||||
|
@ -54,3 +80,12 @@ diff -up libsndfile-1.0.17/src/sndfile.c.r1610 libsndfile-1.0.17/src/sndfile.c
|
|||
|
||||
{ SFE_SVX_NO_FORM , "Error in 8SVX / 16SV file, no 'FORM' marker." },
|
||||
{ SFE_SVX_NO_BODY , "Error in 8SVX / 16SV file, no 'BODY' marker." },
|
||||
@@ -560,7 +561,7 @@ sf_format_check (const SF_INFO *info)
|
||||
** Return 0 on failure, 1 ons success.
|
||||
*/
|
||||
|
||||
- if (info->channels < 1 || info->channels > 256)
|
||||
+ if (info->channels < 1 || info->channels > SF_MAX_CHANNELS)
|
||||
return 0 ;
|
||||
|
||||
if (info->samplerate < 0)
|
|
@ -17,7 +17,7 @@ Patch2: libsndfile-1.0.17-channels-per-frame-overflow.patch
|
|||
Patch3: voc-aiff-patch-1.0.17.diff
|
||||
|
||||
#from upstream, for libsndfile < 1.0.25, crash by overflow with some PAF files (#721239)
|
||||
Patch4: libsndfile-1.0.17-r1610.patch
|
||||
Patch4: libsndfile-1.0.17-r1305,1610.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot-%(%{__id_u} -n)
|
||||
|
||||
|
|
Loading…
Reference in New Issue