freeswitch / spandsp

SpanDSP is a low-level signal processing library that modulates and demodulates signals commonly used in telephony, such as the "noise" generated by a fax modem or DTMF touchpad.
Other
141 stars 117 forks source link

Color faxing and setjmp seg faults and exit(EXIT_FAILURE); #69

Open blindraccoon opened 8 months ago

blindraccoon commented 8 months ago

When compiling FreeSWITCH 1.10.10 on Windows x64 and enabling color faxing by defining JPEG_SUPPORT in libtiff the buffer used for setjmp/longjmp in t42_itulab_jpeg_to_srgb() is not aligned properly and the call to setjmp results in seg fault. If I 'hack' around this alignment issues and give setjmp a properly aligned buffer if the jpeg decompression fails and the jpeg error handler is called it exits to the OS via and exit(EXIT_FAILURE) in libjpeg's error_exit() function. This seems to because the initialization of the decompressor error manager is incorrect in the way it sets up it's callbacks which get overridden by the defaults when jpeg_std_error() is called. These issues are the same in t42_srgb_to_itulab_jpeg().

Any guidance is appreciated