mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-10-18 11:10:05 +00:00
fix strncpy bound error (#4331)
This commit is contained in:
parent
b8587c984a
commit
eeff9af1e6
@ -37,7 +37,7 @@ spv_diagnostic spvDiagnosticCreate(const spv_position position,
|
||||
diagnostic->position = *position;
|
||||
diagnostic->isTextSource = false;
|
||||
memset(diagnostic->error, 0, length);
|
||||
strncpy(diagnostic->error, message, length);
|
||||
strcpy(diagnostic->error, message);
|
||||
return diagnostic;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user