diff options
Diffstat (limited to 'csource')
| -rw-r--r-- | csource/csource.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/csource/csource.go b/csource/csource.go index 316ac9297..08ccae03a 100644 --- a/csource/csource.go +++ b/csource/csource.go @@ -30,7 +30,10 @@ type Options struct { } func Write(p *prog.Prog, opts Options) ([]byte, error) { - exec := p.SerializeForExec(0) + exec := make([]byte, prog.ExecBufferSize) + if err := p.SerializeForExec(exec, 0); err != nil { + return nil, fmt.Errorf("failed to serialize program: %v", err) + } w := new(bytes.Buffer) fmt.Fprint(w, "// autogenerated by syzkaller (http://github.com/google/syzkaller)\n\n") |
