aboutsummaryrefslogtreecommitdiffstats
path: root/oae2.go
diff options
context:
space:
mode:
Diffstat (limited to 'oae2.go')
-rw-r--r--oae2.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/oae2.go b/oae2.go
index e2bb1c1..ff59b76 100644
--- a/oae2.go
+++ b/oae2.go
@@ -306,7 +306,14 @@ func (r *Reader) initialize() error {
}
// Decrypt the first segment now to make sure we validate the
// additional data
- return r.fillBuf()
+ if err := r.fillBuf(); err != nil {
+ if err == io.EOF {
+ r.err = io.ErrUnexpectedEOF
+ return r.err
+ }
+ return err
+ }
+ return nil
}
func (r *Reader) init() error {