-
Notifications
You must be signed in to change notification settings - Fork 580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jes/uac registrant null pointer dereference #3165
Jes/uac registrant null pointer dereference #3165
Conversation
fc10bb5
to
5823ab4
Compare
Hi @jes , imho the proper fix would be to have |
@jes , see me alternative commit - if works for you, I will backport and close here. |
@bogdan-iancu looks good to me! It solves the segfault, and the logic looks fine for the |
Thanks @jes for the confirmation, the backports are in place, closing here |
Summary
I was seeing segfaults when trying to make opensips register against a server with a much-too-short interval. I traced the problem back to a uac_registrant null pointer dereference of
msg->min_expires
.Details
This commit makes uac_registrant only try to dereference
msg->min_expires
if it is non-NULL.Solution
I wrapped the dereference of
msg->min_expires
inif (msg->min_expires)
.Compatibility
It is possible that we would instead want
parse_min_expires()
to return nonzero ifmsg->min_expires
is NULL. I couldn't quite work out what logic was intended. I think the code in this PR will fix the segfault, but it may not correct the intended behaviour.Closing issues