From 112fec200ed1c2347af973acf01112a903df7320 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Tue, 9 Jul 2024 16:04:33 +0200 Subject: [PATCH] distroquery.cpp: fix for previous segfault fix --- src/distroquery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/distroquery.cpp b/src/distroquery.cpp index 1f1940f..654a016 100644 --- a/src/distroquery.cpp +++ b/src/distroquery.cpp @@ -1541,7 +1541,7 @@ main(int argc, char *argv[]) DistroqueryAPI *api = new DistroqueryAPI(firstconfigtag); api->getApiResponse(&path_info[strlen(API_PREFIX)]); exit(0); - } else { + } else if (path_info && strlen(path_info) > 0) { cout << "Content-Type: text/html;charset=utf-8" << endl; cout << "Status: 400 Bad request" << endl << endl; cout << "ERROR: invalid path: " << path_info;