diff options
Diffstat (limited to 'audio/libsndfile/patches/patch-CVE-2021-3246')
-rw-r--r-- | audio/libsndfile/patches/patch-CVE-2021-3246 | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/audio/libsndfile/patches/patch-CVE-2021-3246 b/audio/libsndfile/patches/patch-CVE-2021-3246 deleted file mode 100644 index 4d294900b4b..00000000000 --- a/audio/libsndfile/patches/patch-CVE-2021-3246 +++ /dev/null @@ -1,31 +0,0 @@ -$NetBSD: patch-CVE-2021-3246,v 1.1 2021/09/09 12:03:10 nia Exp $ - -[PATCH] ms_adpcm: Fix and extend size checks - -'blockalign' is the size of a block, and each block contains 7 samples -per channel as part of the preamble, so check against 'samplesperblock' -rather than 'blockalign'. Also add an additional check that the block -is big enough to hold the samples it claims to hold. - -https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26803 -https://github.com/libsndfile/libsndfile/pull/713 - ---- src/ms_adpcm.c.orig 2021-01-23 16:12:45.000000000 +0000 -+++ src/ms_adpcm.c -@@ -128,8 +128,14 @@ wavlike_msadpcm_init (SF_PRIVATE *psf, i - if (psf->file.mode == SFM_WRITE) - samplesperblock = 2 + 2 * (blockalign - 7 * psf->sf.channels) / psf->sf.channels ; - -- if (blockalign < 7 * psf->sf.channels) -- { psf_log_printf (psf, "*** Error blockalign (%d) should be > %d.\n", blockalign, 7 * psf->sf.channels) ; -+ /* There's 7 samples per channel in the preamble of each block */ -+ if (samplesperblock < 7 * psf->sf.channels) -+ { psf_log_printf (psf, "*** Error samplesperblock (%d) should be >= %d.\n", samplesperblock, 7 * psf->sf.channels) ; -+ return SFE_INTERNAL ; -+ } ; -+ -+ if (2 * blockalign < samplesperblock * psf->sf.channels) -+ { psf_log_printf (psf, "*** Error blockalign (%d) should be >= %d.\n", blockalign, samplesperblock * psf->sf.channels / 2) ; - return SFE_INTERNAL ; - } ; - |