Skip to content

Commit 70f6255

Browse files
cuda: For the disabled reason in cuda_init_private check the snprintf return value with PAPI_HUGE_STR_LEN instead of PAPI_MAX_STR_LEN
1 parent 40c56d8 commit 70f6255

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/cuda/linux-cuda.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ static int cuda_init_private(void)
204204
// Cuda component is disabled
205205
else {
206206
strLen = snprintf(_cuda_vector.cmp_info.disabled_reason, PAPI_HUGE_STR_LEN, "%s", err_string);
207-
if (strLen < 0 || strLen >= PAPI_MAX_STR_LEN) {
207+
if (strLen < 0 || strLen >= PAPI_HUGE_STR_LEN) {
208208
SUBDBG("Failed to fully write the disabled reason.\n");
209209
}
210210
goto fn_fail;

0 commit comments

Comments
 (0)