From 3830423b3a6cfd6ef9a76fef66b6e5d2bdcc9fd7 Mon Sep 17 00:00:00 2001 From: Kamil Kopryk Date: Mon, 20 May 2024 16:31:30 +0000 Subject: [PATCH] refactor: correct typo Signed-off-by: Kamil Kopryk --- shared/source/device_binary_format/zebin/zebin_decoder.cpp | 2 +- .../test/unit_test/device_binary_format/zebin_decoder_tests.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/source/device_binary_format/zebin/zebin_decoder.cpp b/shared/source/device_binary_format/zebin/zebin_decoder.cpp index ef144a0702..1f2537ecf3 100644 --- a/shared/source/device_binary_format/zebin/zebin_decoder.cpp +++ b/shared/source/device_binary_format/zebin/zebin_decoder.cpp @@ -161,7 +161,7 @@ DecodeError decodeIntelGTNoteSection(ArrayRef intelGTNotesSection auto currOffset = sizeof(Elf::ElfNoteSection) + alignUp(nameSz, 4) + alignUp(descSz, 4); if (currentPos + currOffset > sectionSize) { intelGTNotes.clear(); - outErrReason.append("DeviceBinaryFormat::zebin : Offseting will cause out-of-bound memory read! Section size: " + std::to_string(sectionSize) + + outErrReason.append("DeviceBinaryFormat::zebin : Offsetting will cause out-of-bound memory read! Section size: " + std::to_string(sectionSize) + ", current section data offset: " + std::to_string(currentPos) + ", next offset : " + std::to_string(currOffset) + "\n"); return DecodeError::invalidBinary; } diff --git a/shared/test/unit_test/device_binary_format/zebin_decoder_tests.cpp b/shared/test/unit_test/device_binary_format/zebin_decoder_tests.cpp index fa35cb6bd6..9df470f1b0 100644 --- a/shared/test/unit_test/device_binary_format/zebin_decoder_tests.cpp +++ b/shared/test/unit_test/device_binary_format/zebin_decoder_tests.cpp @@ -6294,7 +6294,7 @@ TEST_F(IntelGTNotesFixture, WhenValidatingTargetDeviceGivenInvalidIntelGTNotesSe auto result = validateTargetDevice(elf, targetDevice, outErrReason, outWarning, singleDeviceBinary); EXPECT_FALSE(result); EXPECT_TRUE(outWarning.empty()); - auto errStr{"DeviceBinaryFormat::zebin : Offseting will cause out-of-bound memory read! Section size: " + std::to_string(incorrectSectionDataSize) + + auto errStr{"DeviceBinaryFormat::zebin : Offsetting will cause out-of-bound memory read! Section size: " + std::to_string(incorrectSectionDataSize) + ", current section data offset: " + std::to_string(sectionDataSize)}; EXPECT_TRUE(std::string::npos != outErrReason.find(errStr)); }