From 4eda9b07e5f25565333fdd8eed4e33850bd0f828 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 28 Dec 2015 12:58:10 +0100 Subject: prog: don't serialize paddings Paddings in serialized programs are unnecessary and confusing. Instead restore them implicitly. Also use [,,,,] for arrays. --- prog/encodingexec.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'prog/encodingexec.go') diff --git a/prog/encodingexec.go b/prog/encodingexec.go index 3b0d4c28c..3b68f6c98 100644 --- a/prog/encodingexec.go +++ b/prog/encodingexec.go @@ -8,6 +8,8 @@ package prog import ( "fmt" + + "github.com/google/syzkaller/sys" ) const ( @@ -57,7 +59,7 @@ func (p *Prog) SerializeForExec() []byte { } return } - if pad, _ := arg1.IsPad(); pad { + if sys.IsPad(arg1.Type) { return } if arg1.Kind == ArgData && len(arg1.Data) == 0 { -- cgit mrf-deployment