aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--prog/size.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/prog/size.go b/prog/size.go
index 1a0b9dcb6..11f1ccaf8 100644
--- a/prog/size.go
+++ b/prog/size.go
@@ -172,6 +172,12 @@ func (r *randGen) mutateSize(arg *ConstArg, parent []Arg, fields []Field) bool {
switch targetType := inner.Type().(type) {
case *VmaType:
return false
+ case *BufferType:
+ // Don't mutate size of compressed images.
+ // If we do, then our code will fail/crash on decompression.
+ if targetType.Kind == BufferCompressed {
+ return false
+ }
case *ArrayType:
if targetType.Elem.Varlen() {
return false