-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not corrupt files when changing both number of channels and sample… #25
Conversation
After applying the patch, your modified test-case still throws an error (before "expected 1, got -101"), now: $ ./sixteen-stereo-to-eight-mono What am I missing? |
This has been assigned CVE-2015-7747 by MITRE: http://www.openwall.com/lists/oss-security/2015/10/08/1 |
mschwendt: maybe different compilers round to integers in different ways? I get the same error on Linux, but on Windows the test passes |
The version posted on Launchpad has 392 replaced with 792 in the initialisation of frames16 (as well as some minor other changes), and you get the error "expected 28, got 29". The version in this pull request does not give the error |
Progress! The version in this pull request doesn't compile:
However, fetching the code from launchpad and replacing 792 with 392, it compiles and passes the test without errors. |
The signature for createTemporaryFile has changed in 34c2610 . The file in Launchpad is made so it compiles with version 0.3.6 (the one distributed with Ubuntu currently) and the file in this pull request uses the signature for master HEAD. |
Pardon my ignorance, but where can I find the patch on launchpad? I am trying to patch audiofile 0.3.6 in the nixpkgs distribution, and I found bug 1502721 on launchpad, but I couldn't find a patch attached to it. |
On Oct 31, 2015 18:36, "James Cook" notifications@github.com wrote:
Hi James, the patch shipped by Ubuntu can be found in the Debian patches If you have an Ubuntu system (or any Debian-derivative with correct deb-src Thanks |
Thanks! Looks like @pSub found it (NixOS/nixpkgs#10829). nixpkgs isn't apt-based, but we are grateful for the patches that come from Debian and Ubuntu. |
Fabrizio, thanks very much for identifying and solving this problem. This change is applied in 49103e3. |
Example: open a 16-bit stereo file and convert it to mono 32-bit by using
afSetVirtualChannels(fh, AF_DEFAULT_TRACK, 1);
afSetVirtualSampleFormat(fh, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 32);
The resulting samples read with afReadFrames will be corrupted.