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

Change-Id: Ie58be0495065713bae7e13923ac04a4643e246be


[ROCm/clr commit: 4e2f7192e3]
Ta zmiana jest zawarta w:
Jaydeep Patel authored and Jaydeepkumar Patel committed 2022-11-03 00:04:27 -04:00
1 rodzic 9091d2751f
złożenie 420ab29155
Plik 1 zmieniony
+2 -1
+2 -1
Wyświetl plik
@@ -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);
}