diff options
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/hud/hud_context.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c index fd9a7bc2fcb..a635797328d 100644 --- a/src/gallium/auxiliary/hud/hud_context.c +++ b/src/gallium/auxiliary/hud/hud_context.c @@ -1275,8 +1275,10 @@ hud_parse_env_var(struct hud_context *hud, const char *env) strip_hyphens(s); if (!LIST_IS_EMPTY(&pane->graph_list)) { - strcpy(LIST_ENTRY(struct hud_graph, - pane->graph_list.prev, head)->name, s); + struct hud_graph *graph; + graph = LIST_ENTRY(struct hud_graph, pane->graph_list.prev, head); + strncpy(graph->name, s, sizeof(graph->name)-1); + graph->name[sizeof(graph->name)-1] = 0; } } |