Commit eaac662
vmm: Fix bzip2 magic header detection
The bzip2 magic byte search uses .windows(4) to produce 4-byte slices,
but compares them against the 3-byte pattern [b'B', b'Z', b'h']. As a
result, we will never see a match. Thus, the bzip2 header is never
found, and loading always fails with ImageBz2Invalid (surfacing as
EINVAL to callers).
Fix the issue by using .windows(3), matching how the gzip path handles
its 3-byte magic.
Signed-off-by: Daniel Müller <[email protected]>1 parent 44312fd commit eaac662
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1183 | 1183 | | |
1184 | 1184 | | |
1185 | 1185 | | |
1186 | | - | |
| 1186 | + | |
1187 | 1187 | | |
1188 | 1188 | | |
1189 | 1189 | | |
| |||
0 commit comments