Fix buffer overrun (#655)
Assigning a null terminator at the end of the string wrote past the end of the allocated buffer. This patch corrects that. Signed-off-by: Ashutosh Mishra <ashutosh.mishra@amd.com>
このコミットが含まれているのは:
@@ -48,9 +48,7 @@ static VerErrors getBuildInfo( char* InfoString, int len ) {
|
||||
|
||||
NULL_CHECK(InfoString);
|
||||
#if defined(ROCM_BUILD_INFO)
|
||||
|
||||
strcpy(InfoString,ROCM_BUILD_INFO);
|
||||
InfoString[len]='\0';
|
||||
snprintf(InfoString, len, "%s", ROCM_BUILD_INFO);
|
||||
#else
|
||||
return VerValuesNotDefined;
|
||||
#endif //end defination checker
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする