Bug reports go in JIRA, FreeSWITCH.org/jira<span></span><br><br>On Wednesday, July 8, 2015, Alexey Melnichuk &lt;<a href="mailto:alexeymelnichuck@gmail.com">alexeymelnichuck@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">FreeSWITCH Version 1.4.20+git~20150703T164215Z~b95362f965~32bit (git b95362f<br>
2015-07-03 16:42:15Z 32bit)<br>
<br>
I think I found bug in spandsp.<br>
<br>
`t4_image_put_handler_t` defined as (__cdecl)<br>
<br>
typedef int (*t4_image_put_handler_t)(void *user_data, const uint8_t buf[],<br>
size_t len);<br>
<br>
But `tXX_decode_put` functions defined as `__stdcall`.<br>
So when I do<br>
<br>
s-&gt;image_put_handler = (t4_image_put_handler_t) t4_t6_decode_put;<br>
...<br>
s-&gt;image_put_handler(...)<br>
<br>
I got AV.<br>
<br>
After I declare t4_image_put_handler_t as __stdcall problem solved.<br>
(Alse need update declaretion to `pre_encoded_put` function)<br>
<br>
But I start getting heap corruption on<br>
`span_free((char *) s-&gt;tiff.file);`<br>
<br>
Problem is that it uses `strdup` function with different allocator.<br>
So I just copy function to `alloc.c`<br>
<br>
SPAN_DECLARE(char *) span_strdup(const char *str)<br>
{<br>
    char *sdup;<br>
    size_t len = strlen(str) + 1;<br>
<br>
    sdup = (char *) span_alloc(len);<br>
    memcpy(sdup, str, len);<br>
<br>
    return sdup;<br>
}<br>
<br>
And use it as<br>
ds-&gt;tiff.file = span_strdup(file);<br>
<br>
<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;consulting@freeswitch.org&#39;)">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;FreeSWITCH-users@lists.freeswitch.org&#39;)">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote><br><br>-- <br><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">







<p><font face="courier new, monospace"><b><i><font size="4">Brian West</font></i></b><br><span style="font-size:x-small"><a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a></span></font></p>
<p><font size="1" face="courier new, monospace"><img src="http://billing.freeswitch.org/templates/default/img/whmcslogo.png"><br></font></p><p><font size="2" face="monospace, monospace"><b><i>Twitter: @FreeSWITCH , @briankwest</i></b><br><a href="http://www.freeswitchbook.com" target="_blank">http://www.freeswitchbook.com</a><br><a href="http://www.freeswitchcookbook.com" target="_blank">http://www.freeswitchcookbook.com</a></font></p><p><font face="monospace, monospace">ClueCon 2015 <a href="https://www.cluecon.com/call-for-speakers/" target="_blank">Call for Speakers</a> | <a href="https://freeswitch.com/cart.php?gid=1" target="_blank">Register</a> TODAY! | Reddit: <a href="https://www.reddit.com/r/freeswitch" target="_blank">/r/freeswitch</a></font></p>
<p><font size="2" face="monospace, monospace"><b>T:</b>+19184209001 | <b>F:</b>+19184209002 | <b>M:</b>+1918424WEST (9378)<br><b>iNUM:</b>+883 5100 1420 9001 | <b>ISN:</b>410*543 | <b>Skype:</b>briankwest</font></p></div></div></div></div></div></div></div><br>