added std::max to avoid buffer overflow in printing (#25)

[ROCm/rccl-tests commit: 9d3a53dfa3]
Tá an tiomantas seo le fáil i:
akolliasAMD údaraithe agus GitHub tiomanta 2022-11-01 11:34:55 -06:00
1 tuismitheoir b2fbba7bc7
tiomantas 1db5cf9986
1 comhad athraithe
+1 -1
+1 -1
Féach ar an gComhad
@@ -652,7 +652,7 @@ testResult_t TimeTest(struct threadArgs* args, ncclDataType_t type, const char*
setupArgs(size, type, args);
char rootName[100];
sprintf(rootName, "%6i", root);
PRINT("%12li %12li %8s %6s %6s", (size_t)max(args->sendBytes, args->expectedBytes), args->nbytes / wordSize(type), typeName, opName, rootName);
PRINT("%12li %12li %8s %6s %6s", std::max(args->sendBytes, args->expectedBytes), args->nbytes / wordSize(type), typeName, opName, rootName);
TESTCHECK(BenchTime(args, type, op, root, 0));
usleep(delay_inout_place);
TESTCHECK(BenchTime(args, type, op, root, 1));