summaryrefslogtreecommitdiff
path: root/lib/btrfs/btrfsitem/item_extent.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2022-07-10 23:49:07 -0600
committerLuke Shumaker <lukeshu@lukeshu.com>2022-07-11 00:44:30 -0600
commitad9ac6d07ce1819260c2b7f090fd4fe742c80d9f (patch)
treeab6a607ea8575382c978f07de943ccf6c077de7c /lib/btrfs/btrfsitem/item_extent.go
parent41ef03aabf8d6db4f926480fc5ddfec014e342d3 (diff)
Fuzz btrfsitem, and by consequence improve binstruct errors
Diffstat (limited to 'lib/btrfs/btrfsitem/item_extent.go')
-rw-r--r--lib/btrfs/btrfsitem/item_extent.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/btrfs/btrfsitem/item_extent.go b/lib/btrfs/btrfsitem/item_extent.go
index 9257d2b..d49243d 100644
--- a/lib/btrfs/btrfsitem/item_extent.go
+++ b/lib/btrfs/btrfsitem/item_extent.go
@@ -74,8 +74,8 @@ type ExtentHeader struct {
type TreeBlockInfo struct {
Key internal.Key `bin:"off=0, siz=0x11"`
- Level uint8 `bin:"off=0x11, siz=0x8"`
- binstruct.End `bin:"off=0x19"`
+ Level uint8 `bin:"off=0x11, siz=0x1"`
+ binstruct.End `bin:"off=0x12"`
}
type ExtentFlags uint64
@@ -131,7 +131,7 @@ func (o *ExtentInlineRef) UnmarshalBinary(dat []byte) (int, error) {
return n, err
}
default:
- return n, fmt.Errorf("btrfsitem.ExtentInlineRef.UnmarshalBinary: unexpected item type %v", o.Type)
+ return n, fmt.Errorf("unexpected item type %v", o.Type)
}
return n, nil
}
@@ -163,7 +163,7 @@ func (o ExtentInlineRef) MarshalBinary() ([]byte, error) {
return dat, err
}
default:
- return dat, fmt.Errorf("btrfsitem.ExtentInlineRef.MarshalBinary: unexpected item type %v", o.Type)
+ return dat, fmt.Errorf("unexpected item type %v", o.Type)
}
return dat, nil
}