diff options
| author | 2025-11-22 08:00:00 +0800 | |
|---|---|---|
| committer | 2025-11-22 08:00:00 +0800 | |
| commit | 36bb1539b226522253934a8a6cabdb1c8dacca1b (patch) | |
| tree | 4eae4f54f3d9d8296965268b3fb1c23d0b5dec5f /pack_pack.go | |
| parent | zlib, flatex: Remove code related to dicts (diff) | |
| signature | No signature | |
pack: Allocate the header on the stack instead
Diffstat (limited to 'pack_pack.go')
| -rw-r--r-- | pack_pack.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pack_pack.go b/pack_pack.go index 99f885a1..1b98bcca 100644 --- a/pack_pack.go +++ b/pack_pack.go @@ -506,7 +506,8 @@ func openPackFile(absPath, rel string) (*packFile, error) { return nil, ErrInvalidObject } - header := make([]byte, 12) + var headerArr [12]byte + header := headerArr[:] _, err = io.ReadFull(f, header) if err != nil { _ = f.Close() |
