aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-imagegen
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2022-11-22 17:08:47 +0100
committerDmitry Vyukov <dvyukov@google.com>2022-11-23 09:09:39 +0100
commit24857b29bc28753137e73565e8f9c26e67bf0770 (patch)
tree8de7ced0fec1570a2e81e6cf13e9be8363e9563a /tools/syz-imagegen
parent0313f19c6536a190992aff148a0960c7fea6e47f (diff)
executor: don't pass uncompressed zlib size
This will allow us to mutate the image size. Fixes #3527
Diffstat (limited to 'tools/syz-imagegen')
-rw-r--r--tools/syz-imagegen/imagegen.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/syz-imagegen/imagegen.go b/tools/syz-imagegen/imagegen.go
index 367e7d8b0..4cd9806be 100644
--- a/tools/syz-imagegen/imagegen.go
+++ b/tools/syz-imagegen/imagegen.go
@@ -778,9 +778,8 @@ func writeImage(image *Image, data []byte, chdir bool) ([]byte, error) {
if chdir {
chdirAsInt = 1
}
- fmt.Fprintf(buf, `syz_mount_image$%v(&AUTO='%v\x00', &AUTO='./file0\x00',`+
- ` 0x%x, AUTO, 0x0, &AUTO, 0x%x, &AUTO="$`,
- image.fs.Name, image.fs.Name, len(data), chdirAsInt)
+ fmt.Fprintf(buf, `syz_mount_image$%v(&AUTO='%v\x00', &AUTO='./file0\x00', 0x0, &AUTO, 0x%x, AUTO, &AUTO="$`,
+ image.fs.Name, image.fs.Name, chdirAsInt)
buf.Write(b64Data)
fmt.Fprintf(buf, "\")\n")