A problem in the handling of some types of remote files has been reported
in mpg123. Because of this, it may be possible for a remote attacker to
execute arbitrary code with the privileges of the mpg123 user.
ok naddy@ jolan@
Code scavenged from tracker, since it's known to work...
removed all special cases, since it's needed only for OpenBSD.
Tweaks after some ho@'s comments.
after the commit ? so that I can either get careless, or waste
time/bandwidth by running each commit twice...
Anyways, files/audio_openbsd.c is a `caching' audio system.
It's much smarter than the old one: uses get encoding to map the reasonable
encodings, does not even cross-check alaw/ulaw when 8 bit/16 bit work okay.
It does keep audio opened all the way instead of closing/reopening all the
time.
and it avoids gratuitous assumptions about PC broken hardware, such as not
having support for 8 bits signed and other brain-damage.
Missing part: it won't convert endianess on the fly when the only `right'
modes have the wrong endianess... this might occur with e.g., a sb16 on
an alpha.
Basically, mpg123 assumptions about audio is broken. It assumes that
audio ioctl that change mode are instantaneous, which they are not, most
often, so that with the old model, start-up was 80 ioctl, which amounts to
~10 seconds with wss.
Added lazyness to basic audio.c so that it won't try to determine whether
we can play @ 8000Hz mono when 44100Hz stereo is what we want, and it
works...