Skip to contentSkip to conversation

trivial audio bug fix in qemu

PATCH Applied Charles Coffing 2 participants 2 messages Aug 1, 2006 – Aug 4, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trivial audio bug fix in qemu

I came across an old bug in qemu. The arguments for several calls to memset are reversed in audio.c. The patch to fix this is attached.

I see this is already fixed upstream in 0.8.2, but if Xen is staying on 0.8.1 for a while, it might be good to include this bug fix.

Thanks.

tools/ioemu/audio/audio.c +2 -2
Index: xen-unstable/tools/ioemu/audio/audio.c
===================================================================
@@ -597,11 +597,11 @@ void audio_pcm_info_clear_buf (struct au
     }
 
     if (info->sign) {
-        memset (buf, len << info->shift, 0x00);
+        memset (buf, 0x00, len << info->shift);
     }
     else {
         if (info->bits == 8) {
-            memset (buf, len << info->shift, 0x80);
+            memset (buf, 0x80, len << info->shift);
         }
         else {
             int i;

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 5 lines · Charles Coffing

I came across an old bug in qemu. The arguments for several calls to memset are reversed in audio.c. The patch to fix this is attached.

I see this is already fixed upstream in 0.8.2, but if Xen is staying on 0.8.1 for a while, it might be good to include this bug fix.

Applied, thanks!

christian

Quoted 16 lines

Thanks.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel