DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New] Link: http://www.fltk.org/str.php?L2279 Version: 1.3-current Sometimes, the program using fl_utf8from_mb give a double-free error and exit abnormally on linux frequently. When I use fl_utf8from_mb to convert some normal multi-bytes characters (please see the attached txt file), this error can be duplicated on my gentoo linux: *** glibc detected *** ./sample: double free or corruption (!prev): 0x... *** ... And fl_utf8from_mb also fail to work on windows. In checked fl_utf.c, I find a line with: buf = (wchar_t*)(malloc(length*sizeof(unsigned short))). Due to sizeof(wchar_t) = 4 on my platform, I try to replace "unsigned short" with "wchar_t" . It seemed that fl_utf8from_mb works after this modification. (See the patch in attachment). Link: http://www.fltk.org/str.php?L2279 Version: 1.3-current Attachment: http://www.fltk.org/strfiles/2279/fl_utf8from_mb_patch.zip _______________________________________________ fltk-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-bugs
