-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Describe the bug
The PIX event decoder attempts to modify constant memory.
To Reproduce
See
PixEvents/decoder/lib/EventReading.cpp
Line 218 in 3a7e70d
| *const_cast<char*>(reinterpret_cast<char const*>(nullTerminator)) = '\0'; |
Expected behavior
When this code needs to make a not-null-terminated string into a null-terminated string, it needs to copy the input into a buffer that is explicitly allocated as modifiable, and is guaranteed to be large enough to include the null terminator.
Actual behavior
If a static const pointer to a not-null-terminated string is passed into the decoder API, the decoder can crash.
Metadata
Metadata
Assignees
Labels
No labels