Comments (3)
Unmodified Audio File Library version 0.2.7 passes the test suite on x86_64. Since 10_au_length_unspecified.dpatch in Debian's audiofile 0.2.6-8 package doesn't apply cleanly against version 0.2.7, it appears that patch is the source of this failure.
The patch below against version 0.2.7 is based upon commit 085132b. With this change running the test suite is successful.
diff -ru audiofile-0.2.7/libaudiofile/next.c audiofile-0.2.7-patched/libaudiofile/next.c
--- audiofile-0.2.7/libaudiofile/next.c 2010-03-18 20:03:58.000000000 -0700
+++ audiofile-0.2.7-patched/libaudiofile/next.c 2011-08-16 11:48:12.163183373 -0700
@@ -64,6 +64,8 @@
NULL /* miscellaneous */
};
+static const uint32_t _AU_LENGTH_UNSPECIFIED = 0xffffffff;
+
status _af_next_read_init (AFfilesetup setup, AFfilehandle file)
{
uint32_t id, offset, length, encoding, sampleRate, channelCount;
@@ -111,7 +113,11 @@
track->f.compressionType = AF_COMPRESSION_NONE;
track->fpos_first_frame = offset;
- track->data_size = af_flength(file->fh) - offset;
+
+ off_t lengthAvailable = af_flength(file->fh) - offset;
+ if (length == _AU_LENGTH_UNSPECIFIED || length > lengthAvailable)
+ length = lengthAvailable;
+ track->data_size = length;
switch (encoding)
{
from audiofile.
OK, so now the new 10_au_length_unspecified.patch looks so: http://paste.debian.net/126485/
What do you think about it?
from audiofile.
The previous version of 10_au_length_unspecified.dpatch is unnecessary, so what I posted above is the entirety of the patch:
http://paste.debian.net/126525/
from audiofile.
Related Issues (20)
- heap-based buffer overflow in ulaw2linear_buf (G711.cpp) HOT 2
- divide-by-zero in BlockCodec::reset1 (BlockCodec.cpp) HOT 2
- heap-based buffer overflow in Expand3To4Module::run (SimpleModule.h) HOT 5
- multiple ubsan crashes HOT 1
- heap-based buffer overflow in ulaw2linear_buf HOT 1
- Memory leak in AUpvnew
- heap-based buffer overflow in FilePOSIX::read
- NULL pointer dereference in ModuleState::setup, in ModuleState.cpp HOT 1
- A heap-buffer-overflow has occurred when running sfconvert HOT 1
- A heap-buffer-overflow has occurred when running sfconvert HOT 1
- New Release HOT 9
- NULL pointer dereference bug in ulaw2linear_buf, in G711.cpp HOT 5
- out of bound heap access in SimpleModule.h HOT 1
- one heap buffer overflow in FilePOSIX::read in File.cpp HOT 2
- make[2]: *** No rule to make target 'afIdentifyNamedFD.3', needed by 'all-am'. Stop. HOT 2
- Memory-leak bug in printfileinfo, in printinfo.c HOT 2
- 0.3.6 + all up to b62c902d: test suite is failing when source code is configured with `--disable-static` and LTO is used
- 0.3.6 + all up to b62c902d: parallel documentation build fails
- audio artifacts when decoding AIFF-C
- Unary_function is deprecated since c++11 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from audiofile.