openbsd-ports/x11/rdesktop/patches/patch-rdpsnd_sun_c
jasper 95138aec18 - update rdesktop to 1.6.0
* includes SECURITY FIXES for several over-/underflows:
  CVE-2008-1801 CVE-2008-1802 CVE-2008-1803
- specify license marker
- prevent picking up libsamplerate if present
- regen PLIST

based on a diff by Devin Smith on ports@, with feedback from
brad@ and steven@ on ports@.

maintainer (ckuethe@) timed-out on this diff.
2008-08-20 16:25:41 +00:00

41 lines
1.2 KiB
Plaintext

$OpenBSD: patch-rdpsnd_sun_c,v 1.1 2008/08/20 16:25:41 jasper Exp $
2 changes are here:
- Change all uint_t to unsigned int. On Linux a uint_t is just a typedef
to unsigned int. We don't have a uint_t.
- In sun_open rdesktop will also check that a device is in full duplex
mode before opening the device successfully. I didn't add code to check
if a device is in full duplex mode, I just removed the check.
--- rdpsnd_sun.c.orig Sat May 10 23:14:38 2008
+++ rdpsnd_sun.c Tue Jun 17 16:08:59 2008
@@ -54,7 +54,7 @@ static uint32 snd_rate;
static short samplewidth;
static char *dsp_dev;
-static uint_t written_samples;
+static unsigned int written_samples;
void sun_play(void);
void sun_record(void);
@@ -147,8 +147,7 @@ sun_open(int mode)
{
AUDIO_INITINFO(&info);
- if ((ioctl(dsp_fd, AUDIO_GETINFO, &info) == -1)
- || !(info.hw_features & AUDIO_HWFEATURE_DUPLEX))
+ if (ioctl(dsp_fd, AUDIO_GETINFO, &info) == -1)
{
close(dsp_fd);
dsp_fd = -1;
@@ -440,7 +439,7 @@ sun_play(void)
if (out->p == out->end)
{
audio_info_t info;
- uint_t delay_samples;
+ unsigned int delay_samples;
unsigned long delay_us;
if (ioctl(dsp_fd, AUDIO_GETINFO, &info) != -1)