Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
audiofile.9159
0006-Check-for-division-by-zero-in-BlockCodec-r...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0006-Check-for-division-by-zero-in-BlockCodec-runPull.patch of Package audiofile.9159
From e018528ab5d767c512e3b35df1c91e53b5e21fea Mon Sep 17 00:00:00 2001 From: Antonio Larrosa <larrosa@kde.org> Date: Thu, 9 Mar 2017 10:21:18 +0100 Subject: [PATCH 2/2] Check for division by zero in BlockCodec::runPull --- libaudiofile/modules/BlockCodec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libaudiofile/modules/BlockCodec.cpp b/libaudiofile/modules/BlockCodec.cpp index 45925e8..963ff26 100644 --- a/libaudiofile/modules/BlockCodec.cpp +++ b/libaudiofile/modules/BlockCodec.cpp @@ -47,7 +47,7 @@ void BlockCodec::runPull() // Read the compressed data. ssize_t bytesRead = read(m_inChunk->buffer, m_bytesPerPacket * blockCount); - int blocksRead = bytesRead >= 0 ? bytesRead / m_bytesPerPacket : 0; + int blocksRead = (bytesRead >= 0 && m_bytesPerPacket > 0) ? bytesRead / m_bytesPerPacket : 0; // Decompress into m_outChunk. for (int i=0; i<blocksRead; i++) -- 2.12.0
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