patch-src_audio_auserver_c 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. $OpenBSD: patch-src_audio_auserver_c,v 1.1 2014/01/30 13:21:43 jasper Exp $
  2. Security fix for CVE-2014-0027,
  3. https://bugzilla.redhat.com/show_bug.cgi?id=1048678
  4. --- src/audio/auserver.c.orig Tue Dec 4 19:14:14 2001
  5. +++ src/audio/auserver.c Thu Jan 30 14:18:33 2014
  6. @@ -59,9 +59,11 @@ static int play_wave_from_socket(snd_header *header,in
  7. int q,i,n,r;
  8. unsigned char bytes[CST_AUDIOBUFFSIZE];
  9. short shorts[CST_AUDIOBUFFSIZE];
  10. +#ifdef DEBUG
  11. cst_file fff;
  12. fff = cst_fopen("/tmp/awb.wav",CST_OPEN_WRITE|CST_OPEN_BINARY);
  13. +#endif
  14. if ((audio_device = audio_open(header->sample_rate,1,
  15. (header->encoding == CST_SND_SHORT) ?
  16. @@ -108,7 +110,9 @@ static int play_wave_from_socket(snd_header *header,in
  17. for (q=r; q > 0; q-=n)
  18. {
  19. n = audio_write(audio_device,shorts,q);
  20. +#ifdef DEBUG
  21. cst_fwrite(fff,shorts,2,q);
  22. +#endif
  23. if (n <= 0)
  24. {
  25. audio_close(audio_device);
  26. @@ -117,7 +121,9 @@ static int play_wave_from_socket(snd_header *header,in
  27. }
  28. }
  29. audio_close(audio_device);
  30. +#ifdef DEBUG
  31. cst_fclose(fff);
  32. +#endif
  33. return CST_OK_FORMAT;