projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb6a1f5
)
microsoft/compiler: Fix incorrect size passed to strncpy
author
Jesse Natalie
<jenatali@microsoft.com>
Mon, 28 Dec 2020 18:44:08 +0000
(10:44 -0800)
committer
Marge Bot
<eric+marge@anholt.net>
Sun, 3 Jan 2021 23:07:21 +0000
(23:07 +0000)
GCC correctly detects/warns that this was the wrong size
Fixes:
b9c61379
("microsoft/compiler: translate nir to dxil")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>
src/microsoft/compiler/dxil_signature.c
patch
|
blob
|
history
diff --git
a/src/microsoft/compiler/dxil_signature.c
b/src/microsoft/compiler/dxil_signature.c
index
9cd94b9
..
e44b16e
100644
(file)
--- a/
src/microsoft/compiler/dxil_signature.c
+++ b/
src/microsoft/compiler/dxil_signature.c
@@
-163,7
+163,7
@@
get_semantic_sv_name(nir_variable *var, struct semantic_info *info)
default:
unreachable("unsupported system value");
}
- strncpy(info->name, var->name,
64
);
+ strncpy(info->name, var->name,
ARRAY_SIZE(info->name) - 1
);
}
static void