[igt-dev] [PATCH i-g-t 3/3] overlay: fix invalid pointer access
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Thu Feb 1 17:32:16 UTC 2018
The 'v' variable isn't defined in this part of the 'TracepointFmt'
rule but because of the way the generator produces code (one function
per rule) it doesn't realize we're accessing a variable from a
different case of the rule and this doesn't lead to a C compiler error
on undefined variable.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
overlay/tracepoint_format.leg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/overlay/tracepoint_format.leg b/overlay/tracepoint_format.leg
index 0db9a55f..5503e1cc 100644
--- a/overlay/tracepoint_format.leg
+++ b/overlay/tracepoint_format.leg
@@ -1,5 +1,5 @@
TracepointFmt =
- 'name' ':' Space n:PropertyName EndLine { free(v.string); }
+ 'name' ':' Space n:PropertyName EndLine { free(n.string); }
'ID:' Space v:Number EndLine { yy->ctx.tp->event_id = v.integer; }
'format:' EndLine
Field+
--
2.15.1
More information about the igt-dev
mailing list