Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The `printBuffer` function was not correctly limiting writes to buffer, we passed the full buffer size to `_vsnprintf_s` despite not starting at the first element. This allows for a buffer overflow of 17 bytes after the buffer. The code is changed to account for this and to truncate the buffer and mark the end with a "TRUNC\n" if the buffer is not large enough. With the current buffer size, the largest printable string is 1005 bytes (1024 - 18 byte header - 1 byte zero termination). Anything larger will result in the string being truncated. Signed-off-by: Axel Gembe <[email protected]>
- Loading branch information