mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 05:24:02 +08:00
Limit access to the printf buffer
Change-Id: Ic212f66ebedc374316c4ad8e32b708ae445f2276 Signed-off-by: Koska <andrzej.koska@intel.com> Related-To: NEO-4595
This commit is contained in:
@@ -25,7 +25,9 @@ void PrintFormatter::printKernelOutput(const std::function<void(char *)> &print)
|
||||
currentOffset = 0;
|
||||
|
||||
// first 4 bytes of the buffer store the actual size of data that was written by printf from within EUs
|
||||
read(&printfOutputBufferSize);
|
||||
uint32_t printfOutputBufferSizeRead = 0;
|
||||
read(&printfOutputBufferSizeRead);
|
||||
printfOutputBufferSize = std::min(printfOutputBufferSizeRead, printfOutputBufferSize);
|
||||
|
||||
uint32_t stringIndex = 0;
|
||||
while (currentOffset + 4 <= printfOutputBufferSize) {
|
||||
|
||||
Reference in New Issue
Block a user