Skip to content

Commit a99804b

Browse files
authored
Merge pull request from GHSA-79jq-hh82-cv9g
Fix Out-of-bound read in sip_method_d
2 parents 51841eb + e96b4b8 commit a99804b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libsofia-sip-ua/sip/sip_parser.c

+4
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,10 @@ sip_method_t sip_method_d(char **ss, char const **return_name)
454454

455455
#undef MATCH
456456

457+
if (strlen(s) < n) {
458+
return sip_method_invalid;
459+
}
460+
457461
if (IS_NON_WS(s[n]))
458462
/* Unknown method */
459463
code = sip_method_unknown;

0 commit comments

Comments
 (0)