From d857116e4143a500d6a1ea13f4baa057ba3b0028 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Fri, 14 Jan 2022 23:12:49 +0100 Subject: [PATCH] [daap] Fix null dereference on missing group-type param --- src/httpd_daap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/httpd_daap.c b/src/httpd_daap.c index efea92d3..7a95c544 100644 --- a/src/httpd_daap.c +++ b/src/httpd_daap.c @@ -1650,7 +1650,7 @@ daap_reply_groups(struct httpd_request *hreq) int ret; param = evhttp_find_header(hreq->query, "group-type"); - if (strcmp(param, "artists") == 0) + if (param && strcmp(param, "artists") == 0) { // Request from Remote may have the form: // groups?meta=dmap.xxx,dma...&type=music&group-type=artists&sort=album&include-sort-headers=1&query=('...')&session-id=...