summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibaut Mattern <tmattern@users.sourceforge.net>2006-03-18 09:15:00 +0000
committerThibaut Mattern <tmattern@users.sourceforge.net>2006-03-18 09:15:00 +0000
commite71857edecf0aa67a34ca262f8c015ff0cdc8a47 (patch)
tree1f9f98970fc450242358f708ea5e67ca09e49a17
parent691a65bf72f3aac9ebed2343c347fd2b5a33e31b (diff)
downloadxine-lib-e71857edecf0aa67a34ca262f8c015ff0cdc8a47.tar.gz
xine-lib-e71857edecf0aa67a34ca262f8c015ff0cdc8a47.tar.bz2
CID: 241
Checker: REVERSE_INULL (help) File: xine-lib/src/input/http_helper.c Function: _x_parse_url Description: Pointer "start" dereferenced before NULL check CVS patchset: 7936 CVS date: 2006/03/18 09:15:00
-rw-r--r--src/input/http_helper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input/http_helper.c b/src/input/http_helper.c
index 601ee0e85..6a44a2ad6 100644
--- a/src/input/http_helper.c
+++ b/src/input/http_helper.c
@@ -19,7 +19,7 @@
*
* URL helper functions
*
- * $Id: http_helper.c,v 1.5 2004/12/24 01:59:11 dsalt Exp $
+ * $Id: http_helper.c,v 1.6 2006/03/18 09:15:00 tmattern Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -59,10 +59,10 @@ int _x_parse_url (char *url, char **proto, char** host, int *port,
/* proto */
start = strstr(url, "://");
- end = start + strlen(start) - 1;
if (!start || (start == url))
goto error;
+ end = start + strlen(start) - 1;
*proto = strndup(url, start - url);
/* user:password */