Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define DISKREADBUFFER_SIZE HEX(10000)
- typedef unsigned short USHORT, *PUSHORT;
- static VOID DetectBiosDisks(....)
- {
- USHORT i;
- ....
- Changed = FALSE;
- for (i = 0; ! Changed && i < DISKREADBUFFER_SIZE; i++)
- {
- Changed = ((PUCHAR)DISKREADBUFFER)[i] != 0xcd;
- }
- ....
- }
- This suspicious code was found in ReactOS project by PVS-Studio static code analyzer.
- Warning message is:
- V547 Expression 'i < 0x10000' is always true. The value range of unsigned short type: [0, 65535]. xboxhw.c 358
- 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
Advertisement