twain / twain-dsm

TWAIN Data Source Manager
140 stars 55 forks source link

macOS 2.4.x MSG_OPENDSM memory exception #16

Open enlightenedmouse opened 5 years ago

enlightenedmouse commented 5 years ago

Description

DG_CONTROL / DAT_PARENT / MSG_OPENDSM fails on macOS using any of the 2.4.x releases of the TWAINDSM.framework.

malloc: Non-aligned pointer 0x1004e632a being freed malloc: *** set a breakpoint in malloc_error_break to debug

Tested on

macOS Mojave Version 10.14.6

enlightenedmouse commented 5 years ago

Seems the culprit is the CFStringCreateWithCStringNoCopy method within the DSM_LoadFunction:

https://github.com/twain/twain-dsm/blob/98a4b653611f9b3ca0df995c3f455d7205cb79e4/TWAIN_DSM/src/dsm.cpp#L3897