pjproject icon indicating copy to clipboard operation
pjproject copied to clipboard

do not print outside the buffer

Open BeardedSkunk opened this issue 3 years ago • 4 comments

else stack-corruption might occur

BeardedSkunk avatar Jul 07 '22 09:07 BeardedSkunk

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Jul 07 '22 09:07 CLAassistant

Could you @BeardedSkunk to sign the CLA, then pjproject team can review it.

silentindark avatar Jul 07 '22 10:07 silentindark

Could you @BeardedSkunk to sign the CLA, then pjproject team can review it.

I did but the workflow still says pending :( when I click on details it says I've already signed.

BeardedSkunk avatar Jul 07 '22 11:07 BeardedSkunk

Thank you very much for finding this issue.

Unfortunately, we cannot skip the NULL terminator since it will make the printed result useless (and potentially dangerous), especially if the result is later passed to APIs such as pjsip_parse_*() or pjsua_verify_url() that expects the input to be NULL terminated.

For sip_tel_uri, it seems to be safe since endbuf has been decremented by one, so I apply the same approach to the others. I have created a new PR #3175 with the modified fix.

sauwming avatar Jul 08 '22 00:07 sauwming