aboutsummaryrefslogtreecommitdiffstats
path: root/prog
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-02-17 16:51:52 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-02-17 19:02:12 +0100
commitdd4fcef5a270fc39a56c0be8122fc6f18314f3cd (patch)
treec7d1dccb26b31dec062b7d493060b624c8a84f0f /prog
parentd21a39fc48c781b8bc818b537ed4bf495d5daa89 (diff)
pkg/compiler: allow len of var-len arrays
All netfilter subsystems use this unfortunately, so demote this to a warning.
Diffstat (limited to 'prog')
-rw-r--r--prog/size.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/prog/size.go b/prog/size.go
index e2451fe15..67f7ef754 100644
--- a/prog/size.go
+++ b/prog/size.go
@@ -127,6 +127,9 @@ func (r *randGen) mutateSize(arg *ConstArg, parent []Arg) bool {
case *VmaType:
return false
case *ArrayType:
+ if targetType.Type.Varlen() {
+ return false
+ }
elemSize = targetType.Type.Size()
}
}