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

Use of uninitialized values #3794

Merged
merged 1 commit into from
Dec 12, 2023
Merged

Use of uninitialized values #3794

merged 1 commit into from
Dec 12, 2023

Conversation

ODCA117
Copy link
Contributor

@ODCA117 ODCA117 commented Nov 30, 2023

Make pjsua_verify_sip_url() initialzied url to 0.

When running Valgrind in our apps we got the following issues reported:

==3012942== 3 errors in context 1 of 12:
==3012942== Conditional jump or move depends on uninitialised value(s)
==3012942==    at 0x49E18B3: pj_ansi_strxcpy (in ../git/libsipd_check.so)
==3012942==    by 0x49293AA: pjsua_verify_sip_url (in ../git/libsipd_check.so)

and was able to track it down to url not being initialized in pjsua_verify_sip_url() but still being used in pj_ansi_strxcpy().
Fixed it by using calloc instead of alloc.

Make pjsua_verify_sip_url() initialzied url to 0.
@sauwming sauwming requested a review from nanangizz December 11, 2023 09:07
@sauwming sauwming added this to the release-2.15 milestone Dec 11, 2023
@sauwming sauwming merged commit 5229ce2 into pjsip:master Dec 12, 2023
27 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants