summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2017-11-11 22:51:07 -0800
committerKenneth Graunke <[email protected]>2017-11-13 17:11:01 -0800
commiteb8ad56ed2ee005ae7bbff3ff87fb1bcc1b6e4f1 (patch)
tree8484b9750d63efee2fe99f5a1a85fc7597d2203d /src
parentac17b38e797a77283970002b3ca7469a63c8afef (diff)
intel/tools/error: Fix null termination of ring name string.
Ported from intel_error_decode. We don't want to run off the end. Reviewed-by: Chris Wilson <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/tools/aubinator_error_decode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/intel/tools/aubinator_error_decode.c b/src/intel/tools/aubinator_error_decode.c
index 9cd0fa761dd..f9d14cc20d5 100644
--- a/src/intel/tools/aubinator_error_decode.c
+++ b/src/intel/tools/aubinator_error_decode.c
@@ -559,6 +559,7 @@ read_data_file(FILE *file)
free(ring_name);
ring_name = malloc(dashes - line);
strncpy(ring_name, line, dashes - line);
+ ring_name[dashes - line - 1] = '\0';
dashes += 4;
for (b = buffers; b->match; b++) {