Closed Joungkyun closed 8 years ago
The cause of this bug is because detect and detect_handledata APIs are not binary safe.
These APIs used strlen() internally. If given strings are UTF-16 or UTF-32 that has BOM code, binary safe problem occurs.
To fix this problems, change prototype of these APIs as follows:
CHARDET_API short detecthandledata (Detect *, const char , size_t, DetectObj _)
However, for comaptibility with old version, add new detect_handledata_r and detect_r APIs
So, don't use detect and detect_handledata APIs and replace to detect_r or detect_handledata_r.
can't detect utf-16 and utf-32