53a59191f0
This release contains a security fix (buffer overflow in the NSF demuxer, CVE-2008-1878). There are also a few bug fixes, and a new JACK output plugin. ok jakemsr@
100 lines
4.8 KiB
Plaintext
100 lines
4.8 KiB
Plaintext
$OpenBSD: patch-src_input_input_http_c,v 1.4 2008/06/18 01:26:41 brad Exp $
|
|
--- src/input/input_http.c.orig Sat Jun 14 19:15:00 2008
|
|
+++ src/input/input_http.c Mon Jun 16 02:30:50 2008
|
|
@@ -407,7 +407,7 @@ static off_t http_plugin_read_int (http_input_plugin_t
|
|
|
|
error:
|
|
if (!_x_action_pending(this->stream))
|
|
- _x_message (this->stream, XINE_MSG_READ_ERROR, this->host, NULL);
|
|
+ _x_message (this->stream, XINE_MSG_READ_ERROR, this->host, (char *)NULL);
|
|
xine_log (this->stream->xine, XINE_LOG_MSG, _("input_http: read error %d\n"), errno);
|
|
return read_bytes;
|
|
}
|
|
@@ -663,7 +663,7 @@ static int http_plugin_open (input_plugin_t *this_gen
|
|
if (http_plugin_basicauth (this_class->proxyuser,
|
|
this_class->proxypassword,
|
|
this->proxyauth, BUFSIZE)) {
|
|
- _x_message(this->stream, XINE_MSG_CONNECTION_REFUSED, "proxy error", NULL);
|
|
+ _x_message(this->stream, XINE_MSG_CONNECTION_REFUSED, "proxy error", (char *)NULL);
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -672,7 +672,7 @@ static int http_plugin_open (input_plugin_t *this_gen
|
|
|
|
if (!_x_parse_url(this->mrl, &this->proto, &this->host, &this->port,
|
|
&this->user, &this->password, &this->uri)) {
|
|
- _x_message(this->stream, XINE_MSG_GENERAL_WARNING, "malformed url", NULL);
|
|
+ _x_message(this->stream, XINE_MSG_GENERAL_WARNING, "malformed url", (char *)NULL);
|
|
return 0;
|
|
}
|
|
use_proxy = use_proxy && _x_use_proxy(this_class, this->host);
|
|
@@ -682,7 +682,7 @@ static int http_plugin_open (input_plugin_t *this_gen
|
|
|
|
if (this->user && strlen(this->user)) {
|
|
if (http_plugin_basicauth (this->user, this->password, this->auth, BUFSIZE)) {
|
|
- _x_message(this->stream, XINE_MSG_CONNECTION_REFUSED, "basic auth error", NULL);
|
|
+ _x_message(this->stream, XINE_MSG_CONNECTION_REFUSED, "basic auth error", (char *)NULL);
|
|
return -1;
|
|
}
|
|
}
|
|
@@ -736,7 +736,7 @@ static int http_plugin_open (input_plugin_t *this_gen
|
|
} while ((res == XIO_TIMEOUT) && (progress <= 100000));
|
|
|
|
if (res != XIO_READY) {
|
|
- _x_message(this->stream, XINE_MSG_NETWORK_UNREACHABLE, this->mrl, NULL);
|
|
+ _x_message(this->stream, XINE_MSG_NETWORK_UNREACHABLE, this->mrl, (char *)NULL);
|
|
return -3;
|
|
}
|
|
}
|
|
@@ -776,7 +776,7 @@ static int http_plugin_open (input_plugin_t *this_gen
|
|
"\015\012",
|
|
VERSION);
|
|
if (_x_io_tcp_write (this->stream, this->fh, this->buf, buflen) != buflen) {
|
|
- _x_message(this->stream, XINE_MSG_CONNECTION_REFUSED, "couldn't send request", NULL);
|
|
+ _x_message(this->stream, XINE_MSG_CONNECTION_REFUSED, "couldn't send request", (char *)NULL);
|
|
xprintf(this_class->xine, XINE_VERBOSITY_DEBUG, "input_http: couldn't send request\n");
|
|
return -4;
|
|
}
|
|
@@ -820,7 +820,7 @@ static int http_plugin_open (input_plugin_t *this_gen
|
|
(sscanf(this->buf, "ICY %d %50[^\015\012]", /* icecast 1 ? */
|
|
&httpcode, httpstatus) != 2)
|
|
) {
|
|
- _x_message(this->stream, XINE_MSG_CONNECTION_REFUSED, "invalid http answer", NULL);
|
|
+ _x_message(this->stream, XINE_MSG_CONNECTION_REFUSED, "invalid http answer", (char *)NULL);
|
|
xine_log (this->stream->xine, XINE_LOG_MSG,
|
|
_("input_http: invalid http answer\n"));
|
|
return -6;
|
|
@@ -831,20 +831,20 @@ static int http_plugin_open (input_plugin_t *this_gen
|
|
_("input_http: 3xx redirection: >%d %s<\n"),
|
|
httpcode, httpstatus);
|
|
} else if (httpcode == 404) {
|
|
- _x_message(this->stream, XINE_MSG_FILE_NOT_FOUND, this->mrl, NULL);
|
|
+ _x_message(this->stream, XINE_MSG_FILE_NOT_FOUND, this->mrl, (char *)NULL);
|
|
xine_log (this->stream->xine, XINE_LOG_MSG,
|
|
_("input_http: http status not 2xx: >%d %s<\n"),
|
|
httpcode, httpstatus);
|
|
return -7;
|
|
} else if (httpcode == 403 || httpcode == 401) {
|
|
- _x_message(this->stream, XINE_MSG_PERMISSION_ERROR, this->mrl, NULL);
|
|
+ _x_message(this->stream, XINE_MSG_PERMISSION_ERROR, this->mrl, (char *)NULL);
|
|
xine_log (this->stream->xine, XINE_LOG_MSG,
|
|
_("input_http: http status not 2xx: >%d %s<\n"),
|
|
httpcode, httpstatus);
|
|
return -8;
|
|
} else if (httpcode < 200 || httpcode >= 300) {
|
|
_x_message(this->stream, XINE_MSG_CONNECTION_REFUSED, "http status not 2xx: ",
|
|
- httpstatus, NULL);
|
|
+ httpstatus, (char *)NULL);
|
|
xine_log (this->stream->xine, XINE_LOG_MSG,
|
|
_("input_http: http status not 2xx: >%d %s<\n"),
|
|
httpcode, httpstatus);
|
|
@@ -940,7 +940,7 @@ static int http_plugin_open (input_plugin_t *this_gen
|
|
} else
|
|
len ++;
|
|
if ( len >= BUFSIZE ) {
|
|
- _x_message(this->stream, XINE_MSG_PERMISSION_ERROR, this->mrl, NULL);
|
|
+ _x_message(this->stream, XINE_MSG_PERMISSION_ERROR, this->mrl, (char *)NULL);
|
|
xine_log (this->stream->xine, XINE_LOG_MSG,
|
|
_("input_http: buffer exhausted after %d bytes."), BUFSIZE);
|
|
return -10;
|