Describe the bug
The PIX event decoder attempts to modify constant memory.
To Reproduce
See
|
*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.