Browse code

core: parser sdp - print hdr name by length on error in get_sdp_hdr_field()

(cherry picked from commit c4e462fa6bda38ac6fd814ce8d98ea030d4049b9)

Daniel-Constantin Mierla authored on 28/12/2021 19:27:43
Showing 1 changed files
... ...
@@ -757,7 +757,8 @@ char* get_sdp_hdr_field(char* buf, char* end, struct hdr_field* hdr)
757 757
 		if (match){
758 758
 			match++;
759 759
 		}else {
760
-			LM_ERR("bad body for <%s>(%d)\n", hdr->name.s, hdr->type);
760
+			LM_ERR("bad body for <%.*s>(%d)\n", hdr->name.len, hdr->name.s,
761
+					hdr->type);
761 762
 			tmp=end;
762 763
 			goto error;
763 764
 		}