From 4a04c87fdfe61740e9e4040d1ce1261e8ba09fd4 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Mon, 7 Oct 2013 14:13:11 +0200 Subject: [PATCH] distroquery: fix a segfault when QUERY_STRING is null --- src/distroquery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/distroquery.c b/src/distroquery.c index cd0fee2..808a09a 100644 --- a/src/distroquery.c +++ b/src/distroquery.c @@ -201,7 +201,7 @@ main(int argc, char *argv[]) } data = getenv("QUERY_STRING"); - if (strlen(data)) { + if (data && strlen(data)) { print_xml_reply(data); printf("\n"); exit(0);