eb44a52c7c
security fix: CVE-2008-0225 - heap-based buffer overflow in libreal (RTSP) also incorporates post release bug fix in WMV decoding from brad, thanks
76 lines
3.0 KiB
Plaintext
76 lines
3.0 KiB
Plaintext
$OpenBSD: patch-src_input_input_cdda_c,v 1.3 2008/01/15 00:36:46 jakemsr Exp $
|
|
--- src/input/input_cdda.c.orig Tue Jan 1 08:30:08 2008
|
|
+++ src/input/input_cdda.c Wed Jan 9 01:57:20 2008
|
|
@@ -71,7 +71,7 @@
|
|
#elif defined(WIN32)
|
|
#define DEFAULT_CDDA_DEVICE "d:\\"
|
|
#else
|
|
-#define DEFAULT_CDDA_DEVICE "/dev/cdrom"
|
|
+#define DEFAULT_CDDA_DEVICE "/dev/rcd0c"
|
|
#endif
|
|
|
|
#define CDDB_SERVER "freedb.freedb.org"
|
|
@@ -612,7 +612,7 @@ static int read_cdrom_frames(cdda_input_plugin_t *this
|
|
return 0;
|
|
}
|
|
|
|
-#elif defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
|
+#elif defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
|
|
|
#include <sys/cdio.h>
|
|
|
|
@@ -625,7 +625,7 @@ static int read_cdrom_toc(int fd, cdrom_toc *toc) {
|
|
struct ioc_toc_header tochdr;
|
|
#if defined(__FreeBSD_kernel__)
|
|
struct ioc_read_toc_single_entry tocentry;
|
|
-#elif defined(__NetBSD__)
|
|
+#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
|
struct ioc_read_toc_entry tocentry;
|
|
struct cd_toc_entry data;
|
|
#endif
|
|
@@ -661,7 +661,7 @@ static int read_cdrom_toc(int fd, cdrom_toc *toc) {
|
|
perror("CDIOREADTOCENTRY");
|
|
return -1;
|
|
}
|
|
-#elif defined(__NetBSD__)
|
|
+#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
|
memset(&data, 0, sizeof(data));
|
|
tocentry.data_len = sizeof(data);
|
|
tocentry.data = &data;
|
|
@@ -682,7 +682,7 @@ static int read_cdrom_toc(int fd, cdrom_toc *toc) {
|
|
(tocentry.entry.addr.msf.minute * CD_SECONDS_PER_MINUTE * CD_FRAMES_PER_SECOND) +
|
|
(tocentry.entry.addr.msf.second * CD_FRAMES_PER_SECOND) +
|
|
tocentry.entry.addr.msf.frame;
|
|
-#elif defined(__NetBSD__)
|
|
+#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
|
toc->toc_entries[i-1].track_mode = (tocentry.data->control & 0x04) ? 1 : 0;
|
|
toc->toc_entries[i-1].first_frame_minute = tocentry.data->addr.msf.minute;
|
|
toc->toc_entries[i-1].first_frame_second = tocentry.data->addr.msf.second;
|
|
@@ -704,7 +704,7 @@ static int read_cdrom_toc(int fd, cdrom_toc *toc) {
|
|
perror("CDIOREADTOCENTRY");
|
|
return -1;
|
|
}
|
|
-#elif defined(__NetBSD__)
|
|
+#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
|
memset(&data, 0, sizeof(data));
|
|
tocentry.data_len = sizeof(data);
|
|
tocentry.data = &data;
|
|
@@ -725,7 +725,7 @@ static int read_cdrom_toc(int fd, cdrom_toc *toc) {
|
|
(tocentry.entry.addr.msf.minute * CD_SECONDS_PER_MINUTE * CD_FRAMES_PER_SECOND) +
|
|
(tocentry.entry.addr.msf.second * CD_FRAMES_PER_SECOND) +
|
|
tocentry.entry.addr.msf.frame;
|
|
-#elif defined(__NetBSD__)
|
|
+#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
|
toc->leadout_track.track_mode = (tocentry.data->control & 0x04) ? 1 : 0;
|
|
toc->leadout_track.first_frame_minute = tocentry.data->addr.msf.minute;
|
|
toc->leadout_track.first_frame_second = tocentry.data->addr.msf.second;
|
|
@@ -763,7 +763,7 @@ static int read_cdrom_frames(cdda_input_plugin_t *this
|
|
perror("CDIOCREADAUDIO");
|
|
return -1;
|
|
}
|
|
-#elif defined(__NetBSD__)
|
|
+#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
|
scsireq_t req;
|
|
int nblocks = 1;
|
|
|