Skip to content

Commit

Permalink
core: added parser mode check
Browse files Browse the repository at this point in the history
  • Loading branch information
korayvt authored and miconda committed Aug 23, 2022
1 parent 5d09caf commit 4598f0a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/core/parser/msg_parser.c
Expand Up @@ -623,9 +623,11 @@ int parse_headers(struct sip_msg* const msg, const hdr_flags_t flags, const int

skip:
msg->unparsed=tmp;
if(msg->headers==NULL) {
/* nothing parsed - invalid input sip message */
goto error1;
if(ksr_sip_parser_mode & KSR_SIP_PARSER_MODE_STRICT) {
if(msg->headers==NULL) {
/* nothing parsed - invalid input sip message */
goto error1;
}
}
/* restore original flags */
msg->parsed_flag |= orig_flag;
Expand Down

0 comments on commit 4598f0a

Please sign in to comment.