distroquery: fix a segfault when QUERY_STRING is null

This commit is contained in:
Silvan Calarco 2013-10-07 14:13:11 +02:00
parent 62dd291349
commit 4a04c87fdf

View File

@ -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("</distroquery>\n");
exit(0);