From e6d8a4a5fc245250a942abbaeb021af4a496264a Mon Sep 17 00:00:00 2001 From: Ross Brunton Date: Fri, 27 Jun 2025 14:57:44 +0100 Subject: [PATCH] [UR][Offload] Fix string length issue when getting device name --- unified-runtime/source/adapters/offload/program.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unified-runtime/source/adapters/offload/program.cpp b/unified-runtime/source/adapters/offload/program.cpp index ca00cfa8baac6..dde21a20b2c24 100644 --- a/unified-runtime/source/adapters/offload/program.cpp +++ b/unified-runtime/source/adapters/offload/program.cpp @@ -89,7 +89,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urProgramCreateWithBinary( size_t DevNameLength; OL_RETURN_ON_ERR(olGetDeviceInfoSize(phDevices[0]->OffloadDevice, OL_DEVICE_INFO_NAME, &DevNameLength)); - DevName.resize(DevNameLength); + DevName.resize(DevNameLength - 1); OL_RETURN_ON_ERR(olGetDeviceInfo(phDevices[0]->OffloadDevice, OL_DEVICE_INFO_NAME, DevNameLength, DevName.data()));