aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary/hud/hud_driver_query.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/gallium/auxiliary/hud/hud_driver_query.c')
-rw-r--r--mesalib/src/gallium/auxiliary/hud/hud_driver_query.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mesalib/src/gallium/auxiliary/hud/hud_driver_query.c b/mesalib/src/gallium/auxiliary/hud/hud_driver_query.c
index b48708c2f..53771fcae 100644
--- a/mesalib/src/gallium/auxiliary/hud/hud_driver_query.c
+++ b/mesalib/src/gallium/auxiliary/hud/hud_driver_query.c
@@ -157,7 +157,8 @@ hud_pipe_query_install(struct hud_pane *pane, struct pipe_context *pipe,
if (!gr)
return;
- strcpy(gr->name, name);
+ strncpy(gr->name, name, sizeof(gr->name));
+ gr->name[sizeof(gr->name) - 1] = '\0';
gr->query_data = CALLOC_STRUCT(query_info);
if (!gr->query_data) {
FREE(gr);