$NetBSD: patch-CVE-2017-14634,v 1.1 2019/07/14 15:39:32 nia Exp $

Fixes: CVE-2017-14634

Upstream commit:
https://github.com/erikd/libsndfile/commit/85c877d5072866aadbe8ed0c3e0590fbb5e16788.patch

--- src/double64.c.orig	2016-04-01 21:08:53.000000000 +0000
+++ src/double64.c
@@ -91,7 +91,7 @@ int
 double64_init	(SF_PRIVATE *psf)
 {	static int double64_caps ;
 
-	if (psf->sf.channels < 1)
+	if (psf->sf.channels < 1 || psf->sf.channels > SF_MAX_CHANNELS)
 	{	psf_log_printf (psf, "double64_init : internal error : channels = %d\n", psf->sf.channels) ;
 		return SFE_INTERNAL ;
 		} ;
