Skip to content
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

ims_usrloc_scscf: assignment of length missing for query_buffer in db_link_contact_to_impu() #1411

Merged
merged 1 commit into from Jan 25, 2018
Merged

ims_usrloc_scscf: assignment of length missing for query_buffer in db_link_contact_to_impu() #1411

merged 1 commit into from Jan 25, 2018

Conversation

christoph-v
Copy link
Contributor

When writing to query_buffer with the help of the snprintf() function,
the result of the functio is written to variable query_buffer_len
instead of to the query_buffer.len itself. This leads to core dump
in some cases. Replaced "_" by "." in "query_buffer_len ="

Pre-Submission Checklist

  • Commit message has the format required by CONTRIBUTING guide
  • Commits are split per component (core, individual modules, libs, utils, ...)
  • Each component has a single commit (if not, squash them into one commit)
  • No commits to README files for modules (changes must be done to docbook files
    in doc/ subfolder, the README file is autogenerated)

Type Of Change

  • Small bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would change existing functionality)

Checklist:

  • PR should be backported to stable branches
  • Tested changes locally
  • Related to issue #XXXX (replace XXXX with an open issue number)

Description

When linking a Contact to an IMPU during SIP REGISTER in S-CSCF, a core dump can happen due to missing assignment of length to query_buffer.
Added the assignment.

db_link_contact_to_impu()

When writing to query_buffer with the help of the snprintf() function,
the result of the functio is written to variable query_buffer_len
instead of to the query_buffer.len itself. This leads to core dump
in some cases. Replaced "_" by "." in "query_buffer_len ="
@ngvoice ngvoice merged commit 6d67bf0 into kamailio:master Jan 25, 2018
@christoph-v christoph-v deleted the wrong_query_buffer_assignment branch January 30, 2018 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants