Browse code

pv: test for HDR_ERROR_T after header name parsing

(cherry picked from commit c264fbc66a4690b073c72ffa8fc095227ce0ae8b)
(cherry picked from commit 18e85c98bb6eebf9afe83aaa0a832d1c4af46e62)
(cherry picked from commit 5e39061818a0d52ac3a692c6357a497a09207e87)

Daniel-Constantin Mierla authored on 03/06/2021 13:29:50 • Henning Westerholt committed on 22/10/2021 11:56:46
Showing 1 changed files
... ...
@@ -3182,8 +3182,8 @@ int pv_parse_hdr_name(pv_spec_p sp, str *in)
3182 3182
 	s.s = p;
3183 3183
 	s.len = in->len+1;
3184 3184
 
3185
-	if (parse_hname2_short(s.s, s.s + s.len, &hdr)==0)
3186
-	{
3185
+	parse_hname2_short(s.s, s.s + s.len, &hdr);
3186
+	if(hdr.type==HDR_ERROR_T) {
3187 3187
 		LM_ERR("error parsing header name [%.*s]\n", s.len, s.s);
3188 3188
 		goto error;
3189 3189
 	}