fix open encrypted file OOM bug, return FileIsEncrpytedErr if file is encrypted

This commit is contained in:
Jeff.JF Lin(林勁甫)
2020-10-21 17:06:43 +08:00
parent 4a6cf26307
commit 35ae9246d6
4 changed files with 27 additions and 6 deletions

2
xls.go
View File

@@ -52,7 +52,7 @@ func OpenReader(reader io.ReadSeeker, charset string) (wb *WorkBook, err error)
}
}
if book != nil {
wb = newWorkBookFromOle2(ole.OpenFile(book, root))
wb, err = newWorkBookFromOle2(ole.OpenFile(book, root))
return
}
}