[SBI] crash when queryparam with empty key (#2626)

Fixed crashes when path contains query parameter with an empty key
This commit is contained in:
Sukchan Lee 2023-09-24 09:17:42 +09:00
parent d4f2b545a3
commit 317d9bf846
1 changed files with 6 additions and 2 deletions

View File

@ -1295,8 +1295,12 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
j = 0;
while(params[j].key && params[j].val) {
ogs_sbi_header_set(request->http.params,
params[j].key, params[j].val);
if (strlen(params[j].key))
ogs_sbi_header_set(request->http.params,
params[j].key, params[j].val);
else
ogs_warn("No KEY in Query-Parms");
j++;
}