File | File | |
| | @@ -53,10 +53,13 @@ func Parse(r io.Reader) (File, error) {
|
53 | 53 | pd, err := parsePrivateData(r, hdr)
|
54 | 54 | if err != nil {
|
55 | 55 | return File{}, err
|
56 | 56 | }
|
57 | 57 |
|
| 58 | // Check for padding with a maximum of three null bytes.
|
| 59 | // TODO: This check needs to be moved to Extended Metadata and Private Data blocks,
|
| 60 | // and made more precise (i.e., the beginning of those blocks must be 4-byte aligned).
|
58 | 61 | n, err := io.Copy(discardZeroes{}, r)
|
59 | 62 | if err != nil {
|
60 | 63 | return File{}, fmt.Errorf("Parse: %v", err)
|
61 | 64 | }
|
62 | 65 | if n > 3 {
|