mirror of https://github.com/OISF/suricata
action handling: add test to avoid direct access
Direct access to the action field of Packet structure is not allowed.pull/392/head
parent
a35c367942
commit
ce95fbdda0
@ -0,0 +1,15 @@
|
|||||||
|
@action@
|
||||||
|
typedef Packet;
|
||||||
|
Packet *p;
|
||||||
|
position p1;
|
||||||
|
@@
|
||||||
|
|
||||||
|
p->action@p1
|
||||||
|
|
||||||
|
@ script:python @
|
||||||
|
p1 << action.p1;
|
||||||
|
@@
|
||||||
|
|
||||||
|
print "Invalid usage of p->action, please use macro at %s:%s" % (p1[0].file, p1[0].line)
|
||||||
|
import sys
|
||||||
|
sys.exit(1)
|
Loading…
Reference in New Issue