spirv-tools/spirv-tools-gcc11.patch
DistroBaker 56ebad8bb1 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/spirv-tools.git#d5cee582316f30f6ddc87f2061b1799b13464c91
2020-12-05 05:19:23 +00:00

14 lines
464 B
Diff

diff --git a/source/diagnostic.cpp b/source/diagnostic.cpp
index edc27c8..77c29d7 100644
--- a/source/diagnostic.cpp
+++ b/source/diagnostic.cpp
@@ -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);
+ memcpy(diagnostic->error, message, length);
return diagnostic;
}