Xiph.Org issueshttps://gitlab.xiph.org/groups/xiph/-/issues2018-01-22T05:18:41Zhttps://gitlab.xiph.org/xiph/vorbis-tools/-/issues/2212oggenc aiff_open buffer overflow2018-01-22T05:18:41Zpengsuoggenc aiff_open buffer overflowI discovered an buffer overflow issue in oggenc/audio.c when it tries to open invalid aiff file.
...I discovered an buffer overflow issue in oggenc/audio.c when it tries to open invalid aiff file.
```
274 if(fread(buffer,1,len,in) < len)
```
The 'len' here can be controlled by user indirectly via:
```
260 if(!find_aiff_chunk(in, "COMM", &len))
```
The attached aiff file can be used to reproduce this issue. I was testing with vorbis-tools-1.4.0Michael SmithMichael Smithhttps://gitlab.xiph.org/xiph/vorbis-tools/-/issues/2149oggdec internationalization is broken2018-01-22T04:21:18ZMartin Steghöferoggdec internationalization is brokenWhile trying to fix a different Debian bug in "oggdec", I've discovered that the "oggdec" executable uses the "_" (underscore) macro for internationalization and has translations of the relevant strings available in the .po files, but ne...While trying to fix a different Debian bug in "oggdec", I've discovered that the "oggdec" executable uses the "_" (underscore) macro for internationalization and has translations of the relevant strings available in the .po files, but nevertheless outputs everything in English. This is probably due to a lack of initialization of the internationalization modules in that executable. I'm contributing a patch that adds the necessary initializations (copied from the other executables in vorbis-tools).Michael SmithMichael Smithhttps://gitlab.xiph.org/xiph/vorbis-tools/-/issues/2148Crash/hang: oggdec doesn't stop on decoding error2018-01-22T04:21:36ZMartin SteghöferCrash/hang: oggdec doesn't stop on decoding errorIt was reported to [Ubuntu's (629135)](https://bugs.launchpad.net/ubuntu/+source/vorbis-tools/+bug/629135) and [Debian's (772978)](https://bugs.debian.org/772978) bug tracking systems that trying to decode a given (broken) ogg/vorbis inp...It was reported to [Ubuntu's (629135)](https://bugs.launchpad.net/ubuntu/+source/vorbis-tools/+bug/629135) and [Debian's (772978)](https://bugs.debian.org/772978) bug tracking systems that trying to decode a given (broken) ogg/vorbis input file, oggdec crashes or goes into an infinite loop (depending on the libvorbis version), while showing "hole in data" warnings.
I've looked into this and realized that libvorbis doesn't actually return the `OV_HOLE` "hole in data" error code (which would be recoverable), but a different (fatal) decoding error. However, oggdec treats all negative return values coming from `ov_read` as `OV_HOLE` errors and therefore as recoverable. So it keeps on calling `ov_read`, which may either crash (libvorbis' data structures may be uninitialized) or simply not progress and therefore capture oggdec in an infinite loop.
I suggest to fix it by applying the attached patch, which makes oggdec exit with an error message on fatal decoding errors. The error string is "borrowed" from ogg123 and therefore already translated into several languages.Michael SmithMichael Smithhttps://gitlab.xiph.org/xiph/vorbis-tools/-/issues/2029[patch] vorbis-tools-1.4.0 has missing linkage to mathlib2018-01-22T04:52:24Zssuominengentoo[patch] vorbis-tools-1.4.0 has missing linkage to mathlibhttp://bugs.gentoo.org/513942
Fix building with `./configure --enable-ogg123 --without-flac --without-speex --without-kate` and `make`:
libtool: link: gcc -Wall -ffast-math -fsigned-char -O2 -pipe -march=native -Wl,-O1 -Wl,--hash-style...http://bugs.gentoo.org/513942
Fix building with `./configure --enable-ogg123 --without-flac --without-speex --without-kate` and `make`:
libtool: link: gcc -Wall -ffast-math -fsigned-char -O2 -pipe -march=native -Wl,-O1 -Wl,--hash-style=gnu -o oggenc oggenc.o audio.o encode.o platform.o resample.o skeleton.o -Wl,--as-needed ../share/libutf8.a ../share/libgetopt.a -lvorbisenc -lvorbis -logg
resample.o:resample.c:function res_init: error: undefined reference to 'sin'
collect2: error: ld returned 1 exit status
libtool: link: gcc -Wall -ffast-math -fsigned-char -O2 -pipe -march=native -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -o ogg123 audio.o buffer.o callbacks.o cfgfile_options.o cmdline_options.o file_transport.o format.o http_transport.o ogg123.o oggvorbis_format.o playlist.o status.o remote.o transport.o vorbis_comments.o vgfilter.o ../share/libutf8.a ../share/libgetopt.a -lvorbisfile -lvorbis -logg -lao -lnsl -lcurl -lpthread
vgfilter.o:vgfilter.c:function vg_init: error: undefined reference to '__pow_finite'
vgfilter.o:vgfilter.c:function vg_init: error: undefined reference to '__pow_finite'
vgfilter.o:vgfilter.c:function vg_filter: error: undefined reference to 'tanh'
vgfilter.o:vgfilter.c:function vg_filter: error: undefined reference to 'tanh'
collect2: error: ld returned 1 exit status
This is using the new GNU gold linker:
$ ld -v
GNU gold (GNU Binutils 2.24) 1.11
Happens because -lm gets appended to the libraries list only with, for example, --with-flac but vgfilter.c and resample.c are always
using functions from the mathlib.
Therefore, always link to mathlib.
Michael SmithMichael Smithhttps://gitlab.xiph.org/xiph/vorbis-tools/-/issues/2025Vorbis tools do not build with gcc 4.9 and "-Werror=format-security" flag2018-01-22T04:22:07ZMarcin JuszkiewiczVorbis tools do not build with gcc 4.9 and "-Werror=format-security" flagvorbis-tools-1.4.0-12.fc21 FTBFS if "-Werror=format-security" flag is used.
..
status.c: In function ‘print_statistics_line’:
status.c:151:7: error: format not a string literal and no format arguments [-Werror=format-security]
le...vorbis-tools-1.4.0-12.fc21 FTBFS if "-Werror=format-security" flag is used.
..
status.c: In function ‘print_statistics_line’:
status.c:151:7: error: format not a string literal and no format arguments [-Werror=format-security]
len += sprintf(str+len, stats->formatstr);Michael SmithMichael Smithhttps://gitlab.xiph.org/xiph/vorbis-tools/-/issues/2009segfault when trying to encode trivial raw input2020-12-06T14:48:21Zhannosegfault when trying to encode trivial raw inputI was recently trying to create a trivial vorbis file containing just a bit of silence. I thought feeding oggenc a bit if zeros as raw input should do. So I came up with this command line:
dd if=/dev/zero bs=1 count=1 | oggenc -r - -o ou...I was recently trying to create a trivial vorbis file containing just a bit of silence. I thought feeding oggenc a bit if zeros as raw input should do. So I came up with this command line:
dd if=/dev/zero bs=1 count=1 | oggenc -r - -o out.ogg
However, it segfaults. I tried it on different systems and this does not happen everywhere. My system is a 64 bit Gentoo Linux (vorbis-tools 1.4.0, libvorbis 1.3.4, libogg 1.3.1) on a T61 thinkpad laptop. Tried it on an old acer 32 bit laptop with Ubuntu and the same problem didn't happen.
If you need more info to track it down please ask.Michael SmithMichael Smithhttps://gitlab.xiph.org/xiph/vorbis-tools/-/issues/2007[charset.c:58]: (style) Same expression on both sides of '||'.2018-01-22T04:18:25ZDavid Binderman[charset.c:58]: (style) Same expression on both sides of '||'.Source code is
if (!*s1 || !*s1)
Suggest new code
if (!*s1 || !*s2)
Source code is
if (!*s1 || !*s1)
Suggest new code
if (!*s1 || !*s2)
https://gitlab.xiph.org/xiph/vorbis-tools/-/issues/1989vorbis-tools-1.4.0/share/charset.c:58: possible coding typo ?2018-01-22T04:54:21ZDavid Bindermanvorbis-tools-1.4.0/share/charset.c:58: possible coding typo ?
Static analysis tool cppcheck says
[charset.c:58] -> [charset.c:58]: (style) Same expression on both sides of '||'.
Source code is
for (;; s1++, s2++) {
if (!*s1 || !*s1)
break;
maybe
for (;; s1++, s2++) {
if (!*s...
Static analysis tool cppcheck says
[charset.c:58] -> [charset.c:58]: (style) Same expression on both sides of '||'.
Source code is
for (;; s1++, s2++) {
if (!*s1 || !*s1)
break;
maybe
for (;; s1++, s2++) {
if (!*s1 || !*s2)
break;
would be better code.
Michael SmithMichael Smithhttps://gitlab.xiph.org/xiph/vorbis-tools/-/issues/1956[PATCH] ogg123 hangs with certain OGG files2018-01-22T04:36:51Zquipyowert[PATCH] ogg123 hangs with certain OGG filesVersion: vorbis tools v1.4.0
System: OpenSUSE 12.1 Linux 3.1.10 32 bit single CPU without hyperthreading.
Reproducibility: Reproducible every time
Sending a SIGINT to Ogg123 while it is playing any of certain ogg files makes it hang. ...Version: vorbis tools v1.4.0
System: OpenSUSE 12.1 Linux 3.1.10 32 bit single CPU without hyperthreading.
Reproducibility: Reproducible every time
Sending a SIGINT to Ogg123 while it is playing any of certain ogg files makes it hang. With some of those files, ogg123 hangs when it has finished playing the file, but with the others it seems to hang somewhere in the middle of playing the file. Each of the attached ogg files taken from ManaPlus (except reminder.ogg) will make ogg123 hang. When it hangs, it will not print any more output or respond to anything. This hang happens both with the ogg123 from the OpenSUSE vorbis-tools-1.4.0 package and the ogg123 I compiled from the vorbis-tools source code myself.
I compiled ogg123 with the DEBUG_BUFFER macro defined, ran it, and looked through the resulting log file. From the information in that log combined with using GDB, I found that ogg123 was hanging in the pthread_cond_wait system call waiting for the other thread to signal it, but the other thread had already exited.
The attached patch fixes this by turning the conditional wait into a timed wait to receive a signal or 1 second to pass. I've only tried this patch on a 32-bit machine, so it might not work on a 64bit machine. This change also makes ogg123 start playing the next file when it is given a SIGINT instead of uselessly freezing on the first file, which it does when starting "ogg123 *.ogg" with the unpatched ogg123 in a directory full of ogg files.
To reproduce on Linux:
1. run "ogg123 attention.ogg" (or another ogg file that hangs it)
2. Wait for ogg123 to show the bar that shows how much of the file it has played.
3. Send ogg123 a SIGINT using Ctrl+C before the bar disappears.
4. ogg123 will hang.
Reproducing under GDB:
1. run "gdb --args ogg123 attention.ogg"
2. type "handle SIGINT nostop print pass"; answer Y
3. type "run".
4. Wait for ogg123 to show the bar that shows how much of the file it has played.
5. Press Control+C before that bar disappears. Ogg123 will now hang.
6. Press Control+Z to get back to the GDB prompt.Michael SmithMichael Smithhttps://gitlab.xiph.org/xiph/vorbis-tools/-/issues/1934Different problems while encoding2018-01-22T04:20:54ZcacaDifferent problems while encodingHi friends,
First of all thank you for you great effort! I am not used to this kind of testing on development projects, and so please correct me if I am tracking badly this bug or message, or this is not the appropiated place.
I'm usin...Hi friends,
First of all thank you for you great effort! I am not used to this kind of testing on development projects, and so please correct me if I am tracking badly this bug or message, or this is not the appropiated place.
I'm using last oggenc exe from vorbis-tools 1.2.0 (win32 binaries)349K 530f79112f5a12f60a878ebd62013521
from your web and I am facing some problems.
I'm doing some tests with different combinations of sampling, #channels and bits, using the RAW mode as in
$> oggenc --raw --raw-chan=2 --raw-bits=16 --raw-rate=44100 --quality=4 --output=44-2-16.ogg 44-2-16.wav
I tried to compress samples of following combinations of the same analog source of music: 44-2-16,44-2-8, 44-1-16, 44-2-8, 22-2-16, 22-2-8, 22-1-16, 22-1-8
First of all I don't know why, encoding any 16 bits stereo sample in raw mode swaps audio channels in my output file. I mean, if a guitar plays in the right channel in the original wavs, its still there when I convert from 8 bits, but swapped after doing it from 16 bits. That does not occur if I use oggenc -q 4 instead, but not with --raw specs (exactly as described above).
Secondly, I don't understand why if ogg detects automatically input channels, sampling, etc., and it seems so because files are differing in just some few bytes, why aren't outputted files identical whether I use spec'ed raw inputs or average behaviour?
And last of all, is it normal that having the original source coded in 8 bits or 16 does not affect the size of the compressed output? I mean, same audio source coded in mono or a half of the sampling freq reduces a lot the outputted ogg, but is not the case when switching between 16/8bit samples, which are really half/double the size.
I tried reading wiki and everything, hope this questions are not really covered with an obvious explanation somewhere and so they are not bugs.
P.S: I used Windows soundrecorder for generating initial sampled and then reopened and saved the file according to every different bit/channel/sampling combination (all outputs have coherent size, reduced by 2 for any 44->22 or stereo->mono or 16bit->8bit factor).
Michael SmithMichael Smithhttps://gitlab.xiph.org/xiph/vorbis-tools/-/issues/1869String concatenation breaks extraction for translation2020-12-06T12:53:57ZgoeranString concatenation breaks extraction for translationIn the file ogginfo/ogginfo2.c there is this code
```
warn(_("WARNING: Expected frame %" I64FORMAT
", got %" I64FORMAT "\n"),
inf->framenum_expected, framenum);
```
The xgettext tool can't handle that, since it doesn't kn...In the file ogginfo/ogginfo2.c there is this code
```
warn(_("WARNING: Expected frame %" I64FORMAT
", got %" I64FORMAT "\n"),
inf->framenum_expected, framenum);
```
The xgettext tool can't handle that, since it doesn't know what I64FORMAT will become. Only "WARNING: Expected frame %" turns up in the message file. (And that will remain unused; that is not what the argument will be at run time.)
There are a few other similar cases in the same file, search for I64FORMAT.Michael SmithMichael Smithhttps://gitlab.xiph.org/xiph/vorbis-tools/-/issues/1803oggenc --ignorelength is not implemented2018-01-22T04:18:25ZAlexey Yakovenkooggenc --ignorelength is not implementedvorbis-tools 1.4.0
--ignorelength switch is documented in --help, and is being passed to format loaders, but is not used anywhere.
problems:
1. if the wavelength is non-zero, it will not be ignored by --ignorelength switch
2. if wave...vorbis-tools 1.4.0
--ignorelength switch is documented in --help, and is being passed to format loaders, but is not used anywhere.
problems:
1. if the wavelength is non-zero, it will not be ignored by --ignorelength switch
2. if wavelength is zero, it will be ignored, and entire wave file will be processed, no matter if --ignorelength switch is used or not.Michael SmithMichael Smithhttps://gitlab.xiph.org/xiph/vorbis-tools/-/issues/1770oggdec manpage examples are wrong2020-12-06T10:22:45Zalexcoggdec manpage examples are wrong1. oggdec gives signed pcm by default yet the first two examples that claim to give unsigned pcm have no sign argument.
2. oggdec --raw=1
"oggdec: option '--raw' doesn't allow an argument"1. oggdec gives signed pcm by default yet the first two examples that claim to give unsigned pcm have no sign argument.
2. oggdec --raw=1
"oggdec: option '--raw' doesn't allow an argument"Michael SmithMichael Smithhttps://gitlab.xiph.org/xiph/vorbis-tools/-/issues/1757strange noise when decoding with oggdec to raw pcm2018-01-22T04:58:40ZGitlab Botstrange noise when decoding with oggdec to raw pcmWhen I convert an OGG file to raw PCM using the following:
"oggdec -R -b 16 -e 0 -s 1 -o something_with_noise.raw something_good.ogg"
and then play it with:
"aplay -f s16_le -c 2 -r 44100 something_with_noise.raw"
I hear nothing but a st...When I convert an OGG file to raw PCM using the following:
"oggdec -R -b 16 -e 0 -s 1 -o something_with_noise.raw something_good.ogg"
and then play it with:
"aplay -f s16_le -c 2 -r 44100 something_with_noise.raw"
I hear nothing but a static noise. May be -e 0 is not little-endian but big-endian. I switched to -e 1 but let the -f s16_le of aplay. Then I hear my former OGG audio, but with a strange background noise.Michael SmithMichael Smithhttps://gitlab.xiph.org/xiph/vorbis-tools/-/issues/1701[PATCH] Vorbis-tools-1.4.0 fails to compile with gcc22018-01-22T04:18:25Zscottmc2[PATCH] Vorbis-tools-1.4.0 fails to compile with gcc2Making all in vcut
make[2]: Entering directory `/boot/develop/haikuports/media-sound/vorbis-tools/work/vorbis-tools-1.4.0/vcut'
source='vcut.c' object='vcut.o' libtool=no \
DEPDIR=.deps depmode=gcc /bin/sh ../depcomp \
gc...Making all in vcut
make[2]: Entering directory `/boot/develop/haikuports/media-sound/vorbis-tools/work/vorbis-tools-1.4.0/vcut'
source='vcut.c' object='vcut.o' libtool=no \
DEPDIR=.deps depmode=gcc /bin/sh ../depcomp \
gcc -DLOCALEDIR=\"/boot/common/share/locale\" -DHAVE_CONFIG_H -I. -I.. -I/boot/common/include -I/boot/common/include -I../include -I../intl -I/boot/common/include -O2 -fsigned-char -g -O2 -c vcut.c
/boot/develop/haikuports/media-sound/vorbis-tools/work/vorbis-tools-1.4.0/vcut/vcut.c: In function `open_output_stream':
/boot/develop/haikuports/media-sound/vorbis-tools/work/vorbis-tools-1.4.0/vcut/vcut.c:243: parse error before `int'
/boot/develop/haikuports/media-sound/vorbis-tools/work/vorbis-tools-1.4.0/vcut/vcut.c:244: `rv' undeclared (first use in this function)
/boot/develop/haikuports/media-sound/vorbis-tools/work/vorbis-tools-1.4.0/vcut/vcut.c:244: (Each undeclared identifier is reported only once
/boot/develop/haikuports/media-sound/vorbis-tools/work/vorbis-tools-1.4.0/vcut/vcut.c:244: for each function it appears in.)
make[2]: *** [vcut.o] Error 1
make[2]: Leaving directory `/boot/develop/haikuports/media-sound/vorbis-tools/work/vorbis-tools-1.4.0/vcut'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/boot/develop/haikuports/media-sound/vorbis-tools/work/vorbis-tools-1.4.0'
make: *** [all] Error 2
Moving int rv to the top of the function then allows vorbis-tools-1.4.0 to fully build. Patch attached.Michael SmithMichael Smithhttps://gitlab.xiph.org/xiph/vorbis-tools/-/issues/1681FLAC ability is not mentioned in man page2018-01-22T04:45:12ZJohn FerlitoFLAC ability is not mentioned in man pageReported at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=572491
Hi! ogg123 is a fine FLAC player, but this is not mentioned in the ogg123
man page. It is e.g. better than mplayer in that it actually displays the
tags while playing. ...Reported at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=572491
Hi! ogg123 is a fine FLAC player, but this is not mentioned in the ogg123
man page. It is e.g. better than mplayer in that it actually displays the
tags while playing. It only says "plays Ogg Vorbis files".
Michael SmithMichael Smithhttps://gitlab.xiph.org/xiph/vorbis-tools/-/issues/1676vorbis-tools: ogg123 plays speex files wrong: lou and distorted2018-01-22T04:18:25ZJohn Ferlitovorbis-tools: ogg123 plays speex files wrong: lou and distortedOriginal debian bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=312185
Sample file at http://www.metadecks.org/software/sweep/audio/demos/female_scrub.spx
PLays fine under mplayer. But under ogg123 sounds very distored, might be ...Original debian bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=312185
Sample file at http://www.metadecks.org/software/sweep/audio/demos/female_scrub.spx
PLays fine under mplayer. But under ogg123 sounds very distored, might be clipping?Michael SmithMichael Smithhttps://gitlab.xiph.org/xiph/vorbis-tools/-/issues/1675bogus "quality setting too high" message when using -q 102018-01-22T05:16:36ZJohn Ferlitobogus "quality setting too high" message when using -q 10Reported on debian bug tracker by Robert Millan
According to --help, the maximum quality value for -q is 10. However:
rmh@aragorn:~$ oggenc -q 10
WARNING: quality setting too high, setting to maximum quality.
[...]
I fixed thi...Reported on debian bug tracker by Robert Millan
According to --help, the maximum quality value for -q is 10. However:
rmh@aragorn:~$ oggenc -q 10
WARNING: quality setting too high, setting to maximum quality.
[...]
I fixed this by comparing the input against an integer (10) instead of a float
(1.0f) after it has been divided by 10.
Please see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=328266 for a patchMichael SmithMichael Smithhttps://gitlab.xiph.org/xiph/vorbis-tools/-/issues/1645[PATCH] allow vcut to read from stdin and/or write to stdout2018-01-22T04:18:25ZDavy Durham[PATCH] allow vcut to read from stdin and/or write to stdoutThis patch allows vcut to be used in a streaming scenario accepting input from stdin and output from stdout when '-' is used as the filename (which is conventional for unix commands anyway).
Please add to the main release at your earlie...This patch allows vcut to be used in a streaming scenario accepting input from stdin and output from stdout when '-' is used as the filename (which is conventional for unix commands anyway).
Please add to the main release at your earliest convenience.
Thanks!
The patch was created against vorbis-tools-1.2.0IvoIvohttps://gitlab.xiph.org/xiph/vorbis-tools/-/issues/1589an infinite loop in oggenc (from vorbis-tools-1.2.0)2018-01-22T04:18:25ZIsaev Ildaran infinite loop in oggenc (from vorbis-tools-1.2.0)The attached input file causes oggenc to enter an infinite loop in function find_wav_chunk, oggenc/audio.c:120.
The file was automatically generated by the dynamic analysis defect detection tool.The attached input file causes oggenc to enter an infinite loop in function find_wav_chunk, oggenc/audio.c:120.
The file was automatically generated by the dynamic analysis defect detection tool.Michael SmithMichael Smith