Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.0:Ports
python-aubio
aubio-wavread-input-validation.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File aubio-wavread-input-validation.patch of Package python-aubio
From 25ecb7338cebc5b8c79092347839c78349ec33f1 Mon Sep 17 00:00:00 2001 From: Paul Brossier <piem@piem.org> Date: Tue, 6 Feb 2018 22:32:59 +0100 Subject: [PATCH] src/io/source_wavread.c: add some input validation (closes: #158) --- src/io/source_wavread.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) --- a/src/io/source_wavread.c +++ b/src/io/source_wavread.c @@ -189,6 +189,26 @@ aubio_source_wavread_t * new_aubio_sourc // BitsPerSample bytes_read += fread(buf, 1, 2, s->fid); bitspersample = read_little_endian(buf, 2); + + if ( channels == 0 ) { + AUBIO_ERR("source_wavread: Failed opening %s (number of channels can not be 0)\n", s->path); + goto beach; + } + + if ( sr == 0 ) { + AUBIO_ERR("source_wavread: Failed opening %s (samplerate can not be 0)\n", s->path); + goto beach; + } + + if ( byterate == 0 ) { + AUBIO_ERR("source_wavread: Failed opening %s (byterate can not be 0)\n", s->path); + goto beach; + } + + if ( bitspersample == 0 ) { + AUBIO_ERR("source_wavread: Failed opening %s (bitspersample can not be 0)\n", s->path); + goto beach; + } #if 0 if ( bitspersample != 16 ) { AUBIO_ERR("source_wavread: can not process %dbit file %s\n",
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor