Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef struct _UNICODE_STRING {
- USHORT Length;
- USHORT MaximumLength;
- PWSTR Buffer;
- } UNICODE_STRING, *PUNICODE_STRING;
- UNICODE_STRING DosDevices =
- RTL_CONSTANT_STRING(L"\\DosDevices\\");
- NTSTATUS CreateNewDriveLetterName(....)
- {
- ....
- DriveLetter->Buffer[
- sizeof(DosDevices.Buffer) / sizeof(WCHAR)] =
- (WCHAR)Letter;
- ....
- }
- This suspicious code was found in ReactOS project by PVS-Studio static code analyzer.
- Warning message is:
- V514 Dividing sizeof a pointer 'sizeof (DosDevices.Buffer)' by another value. There is a probability of logical error presence. mountmgr.c 164
- 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