[asterisk-dev] [Code Review] 4513: res_pjsip_sdp_rtp, sorcery: Fix invalid access and memory leak respectively.

rmudgett reviewboard at asterisk.org
Wed Mar 18 16:51:27 CDT 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4513/
-----------------------------------------------------------

Review request for Asterisk Developers.


Repository: Asterisk


Description
-------

Valgrind found a memory leak and invalid access.

* Fix invalid access by sscanf() being fed a non-nul terminated string of
digits in res/res_pjsip_sdp_rtp.c:get_codecs().

* Fix memory leak in main/sorcery.c:sorcery_object_field_destructor().

* Fix potential NULL pointer dereference in
main/xmldoc.c:xmldoc_get_syntax_config_option().


Diffs
-----

  /branches/13/res/res_pjsip_sdp_rtp.c 433107 
  /branches/13/main/xmldoc.c 433107 
  /branches/13/main/sorcery.c 433107 

Diff: https://reviewboard.asterisk.org/r/4513/diff/


Testing
-------

* Placed a PJSIP call and observed that valgrind no longer complains of sscanf() performing an invalid read in get_codecs().

* Valgrind no longer complains of definitely leaked memory resulting from the sorcery_object_field_destructor().


Thanks,

rmudgett

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150318/cb3afafe/attachment.html>


More information about the asterisk-dev mailing list