[MPlayer-dev-eng] [PATCH] ao_alsa alsa_device string handling fixes
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Jun 27 15:52:40 CEST 2004
Hi,
ao_alsa does some very bad things with alsa_device.
1) char *alsa_device is defined globally although alloca is used to
allocate memory for it, meaning it is undefined outside this function.
2) There are constructs like
{
char devstr[128];
...
...
...
alsa_device = devstr;
}
...
which is complete nonsense as devstr (and thus *alsa_device after the
assignment) will be undefined outside this block.
3) It uses a wild mixture of sprintf, snprintf etc.
the attached patch should improve things a bit.
Alexander (beastd), maybe you could check this, you already have some
experince with that ;-)
Greetings,
Reimar Döffinger
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: alsa_stringfixes.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040627/1a31c99a/attachment.txt>
More information about the MPlayer-dev-eng
mailing list