<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>Easiest way is via git&#8230; see <a href="https://freeswitch.org/stash/projects/FS/repos/freeswitch/browse">https://freeswitch.org/stash/projects/FS/repos/freeswitch/browse</a>&nbsp; (we use stash which is bitbucket or sorta like github)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> freeswitch-dev-bounces@lists.freeswitch.org [mailto:freeswitch-dev-bounces@lists.freeswitch.org] <b>On Behalf Of </b>Vladimir Mancic<br><b>Sent:</b> Tuesday, August 30, 2016 12:19 PM<br><b>To:</b> freeswitch-dev@lists.freeswitch.org<br><b>Subject:</b> Re: [Freeswitch-dev] Static analysis tool Cppcheck discovered many errors in FreeSWITCH code<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'>Thank you. <o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'>And how to get the latest master branch?<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p></div><div><pre style='margin-top:7.5pt;line-height:15.0pt;background:white'><span style='font-size:10.5pt;font-family:"Tahoma",sans-serif;color:#333333'>Vladimir</span><span style='font-size:10.5pt;color:#333333'><o:p></o:p></span></pre></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><div><div class=MsoNormal align=center style='text-align:center'><span style='color:black'><hr size=2 width="100%" align=center></span></div><div id=divRpF210911><p class=MsoNormal style='margin-bottom:12.0pt'><b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'>Od:</span></b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'> <a href="mailto:freeswitch-dev-bounces@lists.freeswitch.org">freeswitch-dev-bounces@lists.freeswitch.org</a> [freeswitch-dev-bounces@lists.freeswitch.org] u ime korisnika Michael Jerris [mike@jerris.com]<br><b>Poslato:</b> 30. avgust 2016 16:05<br><b>Za:</b> <a href="mailto:freeswitch-dev@lists.freeswitch.org">freeswitch-dev@lists.freeswitch.org</a><br><b>Tema:</b> Re: [Freeswitch-dev] Static analysis tool Cppcheck discovered many errors in FreeSWITCH code</span><span style='color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='color:black'>The correct way to do this would be to run this on the latest master branch of freeswitch and file and potential issues as security issues in Jira. &nbsp;Yes, many hundreds of issues have been fixed since 1.4 (1.4 is now eol) and we make use of static analysis tools. &nbsp;Static analysis tools in general have very high false positive rate, we do our best to address issues found with them, but they require much more than running a tool and getting a report. &nbsp;Every single one of those reports needs to be investigated, confirmed if its actually valid (typically 80%+ are not), reported. <o:p></o:p></span></p><div><p class=MsoNormal><span style='color:black'><o:p>&nbsp;</o:p></span></p></div><div><p class=MsoNormal><span style='color:black'><o:p>&nbsp;</o:p></span></p><div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal><span style='color:black'>On Aug 30, 2016, at 9:07 AM, Vladimir Mancic &lt;<a href="mailto:vmancic@ooma.com" target="_blank">vmancic@ooma.com</a>&gt; wrote:<o:p></o:p></span></p></div><p class=MsoNormal><span style='color:black'><o:p>&nbsp;</o:p></span></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'>Hi,<o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'>&nbsp;<o:p></o:p></span></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'>Static analysis tool Cppcheck discovered many errors in FreeSWITCH v1.4 code (memory leaks, resource leaks, double frees,...):<o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'>&nbsp;<o:p></o:p></span></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'>- memleak (76 occurances)<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'>- memleakOnRealloc (12 occurances)<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'>- resourceLeak (21 occurances)<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'>- doubleFree (more than 100 occurances)<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'>Is this known to the&nbsp;FreeSWITCH&nbsp;community, and has there been any work on it&nbsp;in more recent versions of&nbsp;FreeSWITCH?<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'>Thanks,<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif;color:black'>Vladimir<o:p></o:p></span></p></div><p class=MsoNormal><span style='color:black'>&lt;FreeSwitch-Cppcheck-Results.xml&gt;</span><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br></span><span style='color:black'><a href="mailto:consulting@freeswitch.org" target="_blank"><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif'>consulting@freeswitch.org</span></a></span><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'><br></span><span style='color:black'><a href="http://www.freeswitchsolutions.com/" target="_blank"><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif'>http://www.freeswitchsolutions.com</span></a></span><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'><br><br>Official FreeSWITCH Sites<br></span><span style='color:black'><a href="http://www.freeswitch.org/" target="_blank"><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif'>http://www.freeswitch.org</span></a></span><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'><br></span><span style='color:black'><a href="http://wiki.freeswitch.org/" target="_blank"><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif'>http://wiki.freeswitch.org</span></a></span><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'><br></span><span style='color:black'><a href="http://www.cluecon.com/" target="_blank"><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif'>http://www.cluecon.com</span></a></span><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'><br><br>FreeSWITCH-dev mailing list<br></span><span style='color:black'><a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" target="_blank"><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif'>FreeSWITCH-dev@lists.freeswitch.org</span></a></span><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'><br></span><span style='color:black'><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank"><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif'>http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</span></a></span><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'><br>UNSUBSCRIBE:http://</span><span style='color:black'><a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank"><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif'>lists.freeswitch.org/mailman/options/freeswitch-dev</span></a></span><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'><br></span><span style='color:black'><a href="http://www.freeswitch.org/" target="_blank"><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif'>http://www.freeswitch.org</span></a><o:p></o:p></span></p></div></blockquote></div><p class=MsoNormal><span style='color:black'><o:p>&nbsp;</o:p></span></p></div></div></div></div></div></div></body></html>