Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static const JoiningPair joining_table[5][4] = { .... };
- typedef enum {
- JNone,
- JCausing,
- JDual,
- JRight,
- JTransparent
- } Joining;
- static Joining getNkoJoining(unsigned short uc)
- {
- if (uc < 0x7ca)
- return JNone;
- if (uc <= 0x7ea)
- return JDual;
- if (uc <= 0x7f3)
- return JTransparent;
- if (uc <= 0x7f9)
- return JNone;
- if (uc == 0x7fa)
- return JCausing;
- return JNone;
- }
- static void getNkoProperties(....)
- {
- ....
- Joining j = getNkoJoining(chars[0]);
- ArabicShape shape = joining_table[XIsolated][j].form2;
- ....
- }
- This suspicious code was found in QT project by PVS-Studio static code analyzer.
- Warning message is:
- V557 Array overrun is possible. The value of 'j' index could reach 4. harfbuzz-arabic.c 516
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment