[igt-dev] [PATCH igt] tools: Clear unused fields in register spec
Chris Wilson
chris at chris-wilson.co.uk
Fri Feb 2 10:10:25 UTC 2018
If we fail to clear the other fields inside the register spec, that may
be left with garbage instructing us to access the register via an
invalid path.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104895
Fixes: 7f0be0e7d9be ("tools/intel_reg: Add reading and writing registers through engine")
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula at intel.com>
CC: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
---
tools/intel_reg_spec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/intel_reg_spec.c b/tools/intel_reg_spec.c
index 5594d7077..58c8f7e4c 100644
--- a/tools/intel_reg_spec.c
+++ b/tools/intel_reg_spec.c
@@ -267,7 +267,7 @@ static ssize_t parse_file(struct reg **regs, size_t *nregs,
}
while (getline(&line, &linesize, file) != -1) {
- struct reg reg;
+ struct reg reg = {};
lineno++;
--
2.15.1
More information about the igt-dev
mailing list