diff options
author | Timo Teräs <timo.teras@iki.fi> | 2015-01-30 11:07:10 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2015-01-30 11:07:10 +0200 |
commit | 6285fa299ce16c6502150c257935bfdbc3aaf5d9 (patch) | |
tree | df77ae6cbf7891754d47d12680107951036b7cec /main/sox/0001-Check-for-minimum-size-sphere-headers.patch | |
parent | b5baa711a9758d453cb33a6e23de7163e5b40c66 (diff) | |
download | aports-6285fa299ce16c6502150c257935bfdbc3aaf5d9.tar.bz2 aports-6285fa299ce16c6502150c257935bfdbc3aaf5d9.tar.xz |
main/sox: security fix for CVE-2014-8145
ref #3822
Diffstat (limited to 'main/sox/0001-Check-for-minimum-size-sphere-headers.patch')
-rw-r--r-- | main/sox/0001-Check-for-minimum-size-sphere-headers.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/main/sox/0001-Check-for-minimum-size-sphere-headers.patch b/main/sox/0001-Check-for-minimum-size-sphere-headers.patch new file mode 100644 index 0000000000..f01fec390d --- /dev/null +++ b/main/sox/0001-Check-for-minimum-size-sphere-headers.patch @@ -0,0 +1,28 @@ +From 55e33019afcb3256cccedf606548b86816f6da59 Mon Sep 17 00:00:00 2001 +From: Chris Bagwell <chris@cnpbagwell.com> +Date: Sat, 13 Dec 2014 12:48:37 -0600 +Subject: [PATCH 1/2] Check for minimum size sphere headers + +--- + src/sphere.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/sphere.c b/src/sphere.c +index 479a552..a3fd1c6 100644 +--- a/src/sphere.c ++++ b/src/sphere.c +@@ -47,6 +47,11 @@ static int start_read(sox_format_t * ft) + + /* Determine header size, and allocate a buffer large enough to hold it. */ + sscanf(fldsval, "%lu", &header_size_ul); ++ if (header_size_ul < 16) { ++ lsx_fail_errno(ft, SOX_EHDR, "Error reading Sphere header"); ++ return (SOX_EOF); ++ } ++ + buf = lsx_malloc(header_size = header_size_ul); + + /* Skip what we have read so far */ +-- +2.1.0 + |