edbee-lib
edbee-lib copied to clipboard
Dodgy looking casts
In onigmo.h I see the following:
typedef unsigned char OnigUChar;
however in your regexp.cpp I can see in (int) indexIn( const QChar* charPtr, int offset, int length, bool reverse ) some (old C-style) casting being done on pointers to QChar to convert them into OnigUChar ones so they can have pointer arithmetic being carried out on them - and QChars {at least 16 bits} are not the same size as unsigned chars {8 bits} - which looks very suspect! :fearful:
You're right... This looks very dangerous! 😟