- Fix zero-division in PAF parser (bnc#708988) - Fix zero-division in PAF parser (bnc#708988) OBS-URL: https://build.opensuse.org/request/show/77427 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libsndfile?expand=0&rev=25
17 lines
397 B
Diff
17 lines
397 B
Diff
=== modified file 'src/paf.c'
|
|
---
|
|
src/paf.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/src/paf.c
|
|
+++ b/src/paf.c
|
|
@@ -202,7 +202,7 @@
|
|
psf->endian = SF_ENDIAN_BIG ;
|
|
} ;
|
|
|
|
- if (paf_fmt.channels > SF_MAX_CHANNELS)
|
|
+ if (paf_fmt.channels > SF_MAX_CHANNELS || paf_fmt.channels <= 0)
|
|
return SFE_PAF_BAD_CHANNELS ;
|
|
|
|
psf->datalength = psf->filelength - psf->dataoffset ;
|