From bceed9c9c6237d51b95eb22db1b1059be6c493ff Mon Sep 17 00:00:00 2001 From: Philippe Pepiot Date: Fri, 19 Feb 2010 14:32:32 +0100 Subject: [PATCH] fix possible splitchr(NULL) --- cgi/cblog_cgi.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cgi/cblog_cgi.c b/cgi/cblog_cgi.c index 5b15c16..d53925a 100644 --- a/cgi/cblog_cgi.c +++ b/cgi/cblog_cgi.c @@ -374,8 +374,8 @@ cblogcgi(HDF *conf) hdf_set_valuef(cgi->hdf, "CBlog.version=%s", cblog_version); hdf_set_valuef(cgi->hdf, "CBlog.url=%s", cblog_url); - requesturi = get_cgi_str(cgi->hdf, "RequestURI"); - splitchr(requesturi, '?'); + if ((requesturi = get_cgi_str(cgi->hdf, "RequestURI"))) + splitchr(requesturi, '?'); /* find the beginig of the request */ if (requesturi != NULL) -- 1.6.6.1