Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.1:Update
python-aubio
CVE-2019-1010224-onset-safer-deletion-method.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File CVE-2019-1010224-onset-safer-deletion-method.patch of Package python-aubio
From e4e0861cffbc8d3a53dcd18f9ae85797690d67c7 Mon Sep 17 00:00:00 2001 From: Paul Brossier <piem@piem.org> Date: Sat, 24 Nov 2018 18:53:12 +0100 Subject: [PATCH] [onset] safer deletion method --- src/onset/onset.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/onset/onset.c b/src/onset/onset.c index 4e0141a8c90b..6123d51ae1cc 100644 --- a/src/onset/onset.c +++ b/src/onset/onset.c @@ -256,22 +256,22 @@ aubio_onset_t * new_aubio_onset (const char_t * onset_mode, o->pv = new_aubio_pvoc(buf_size, o->hop_size); o->pp = new_aubio_peakpicker(); o->od = new_aubio_specdesc(onset_mode,buf_size); - if (o->od == NULL) goto beach_specdesc; o->fftgrain = new_cvec(buf_size); o->desc = new_fvec(1); o->spectral_whitening = new_aubio_spectral_whitening(buf_size, hop_size, samplerate); + if (!o->pv || !o->pp || !o->od || !o->fftgrain + || !o->desc || !o->spectral_whitening) + goto beach; + /* initialize internal variables */ aubio_onset_set_default_parameters (o, onset_mode); aubio_onset_reset(o); return o; -beach_specdesc: - del_aubio_peakpicker(o->pp); - del_aubio_pvoc(o->pv); beach: - AUBIO_FREE(o); + del_aubio_onset(o); return NULL; } @@ -339,11 +339,17 @@ uint_t aubio_onset_set_default_parameters (aubio_onset_t * o, const char_t * ons void del_aubio_onset (aubio_onset_t *o) { - del_aubio_spectral_whitening(o->spectral_whitening); - del_aubio_specdesc(o->od); - del_aubio_peakpicker(o->pp); - del_aubio_pvoc(o->pv); - del_fvec(o->desc); - del_cvec(o->fftgrain); + if (o->spectral_whitening) + del_aubio_spectral_whitening(o->spectral_whitening); + if (o->od) + del_aubio_specdesc(o->od); + if (o->pp) + del_aubio_peakpicker(o->pp); + if (o->pv) + del_aubio_pvoc(o->pv); + if (o->desc) + del_fvec(o->desc); + if (o->fftgrain) + del_cvec(o->fftgrain); AUBIO_FREE(o); } -- 2.16.4
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