From e71857edecf0aa67a34ca262f8c015ff0cdc8a47 Mon Sep 17 00:00:00 2001 From: Thibaut Mattern Date: Sat, 18 Mar 2006 09:15:00 +0000 Subject: 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 --- src/input/http_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 */ -- cgit v1.2.3