SWDEV-362367 - pciBusId should be large enough to store 13 characters including the NULL-terminator.

Change-Id: Ie58be0495065713bae7e13923ac04a4643e246be
이 커밋은 다음에 포함됨:
Jaydeep Patel
2022-10-31 07:27:04 +00:00
커밋한 사람 Jaydeepkumar Patel
부모 0c4307f86e
커밋 4e2f7192e3
+2 -1
파일 보기
@@ -430,7 +430,8 @@ hipError_t hipDeviceGetPCIBusId ( char* pciBusId, int len, int device ) {
HIP_RETURN(hipErrorInvalidDevice);
}
if (pciBusId == nullptr || len <= 0) {
//pciBusId should be large enough to store 13 characters including the NULL-terminator.
if (pciBusId == nullptr || len <= 12) {
HIP_RETURN(hipErrorInvalidValue);
}