[daap] Fix null dereference on missing group-type param

This commit is contained in:
ejurgensen 2022-01-14 23:12:49 +01:00
parent 5e6f19a6da
commit d857116e41

View File

@ -1650,7 +1650,7 @@ daap_reply_groups(struct httpd_request *hreq)
int ret; int ret;
param = evhttp_find_header(hreq->query, "group-type"); 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: // 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=... // groups?meta=dmap.xxx,dma...&type=music&group-type=artists&sort=album&include-sort-headers=1&query=('...')&session-id=...