Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Alexander_Naumov:SLE-12:Update
libsndfile.4961
libsndfile-src-file_io.c-Prevent-potential-divi...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libsndfile-src-file_io.c-Prevent-potential-divide-by-zero.patch of Package libsndfile.4961
From 725c7dbb95bfaf8b4bb7b04820e3a00cceea9ce6 Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo <erikd@mega-nerd.com> Date: Wed, 24 Dec 2014 21:02:35 +1100 Subject: [PATCH] src/file_io.c : Prevent potential divide-by-zero. Closes: https://github.com/erikd/libsndfile/issues/92 --- src/file_io.c | 3 +++ 1 file changed, 3 insertions(+) --- a/src/file_io.c +++ b/src/file_io.c @@ -358,6 +358,9 @@ psf_fwrite (const void *ptr, sf_count_t { sf_count_t total = 0 ; ssize_t count ; + if (bytes == 0 || items == 0) + return 0 ; + if (psf->virtual_io) return psf->vio.write (ptr, bytes*items, psf->vio_user_data) / bytes ;
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