Bug reports go in JIRA, FreeSWITCH.org/jira On Wednesday, July 8, 2015, Alexey Melnichuk <alexeymelnichuck@gmail.com> wrote:
FreeSWITCH Version 1.4.20+git~20150703T164215Z~b95362f965~32bit (git b95362f 2015-07-03 16:42:15Z 32bit)
I think I found bug in spandsp.
`t4_image_put_handler_t` defined as (__cdecl)
typedef int (*t4_image_put_handler_t)(void *user_data, const uint8_t buf[], size_t len);
But `tXX_decode_put` functions defined as `__stdcall`. So when I do
s->image_put_handler = (t4_image_put_handler_t) t4_t6_decode_put; ... s->image_put_handler(...)
I got AV.
After I declare t4_image_put_handler_t as __stdcall problem solved. (Alse need update declaretion to `pre_encoded_put` function)
But I start getting heap corruption on `span_free((char *) s->tiff.file);`
Problem is that it uses `strdup` function with different allocator. So I just copy function to `alloc.c`
SPAN_DECLARE(char *) span_strdup(const char *str) { char *sdup; size_t len = strlen(str) + 1;
sdup = (char *) span_alloc(len); memcpy(sdup, str, len);
return sdup; }
And use it as ds->tiff.file = span_strdup(file);
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <javascript:;> http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <javascript:;> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- *Brian West* brian@freeswitch.org *Twitter: @FreeSWITCH , @briankwest* http://www.freeswitchbook.com http://www.freeswitchcookbook.com ClueCon 2015 Call for Speakers <https://www.cluecon.com/call-for-speakers/> | Register <https://freeswitch.com/cart.php?gid=1> TODAY! | Reddit: /r/freeswitch <https://www.reddit.com/r/freeswitch> *T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378) *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest