16 lines
426 B
Plaintext
16 lines
426 B
Plaintext
|
$OpenBSD: patch-src_pcm_c,v 1.1 2009/05/31 17:31:13 jasper Exp $
|
||
|
|
||
|
Security fix for SA35266.
|
||
|
|
||
|
--- src/pcm.c.orig Sun Mar 22 13:17:14 2009
|
||
|
+++ src/pcm.c Sun May 31 10:21:16 2009
|
||
|
@@ -271,7 +271,7 @@ pcm_init (SF_PRIVATE *psf)
|
||
|
else
|
||
|
psf->datalength = 0 ;
|
||
|
|
||
|
- psf->sf.frames = psf->datalength / psf->blockwidth ;
|
||
|
+ psf->sf.frames = psf->blockwidth > 0 ? psf->datalength / psf->blockwidth : 0 ;
|
||
|
|
||
|
return 0 ;
|
||
|
} /* pcm_init */
|