mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 17:27:08 +08:00
1 parent
64f9ec4241
commit
0be872691d
76 files changed
+1926
-1307
No files matched your search
@@ -19,6 +19,7 @@ import (
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
basethreed "github.com/xiaoqidun/ofdgo/internal/base/threed"
|
||||
"github.com/xiaoqidun/pdfgo"
|
||||
)
|
||||
|
||||
@@ -31,7 +32,7 @@ func pdfThreeDSections(ctx context.Context, sections []pdfgo.ThreeDCrossSection,
|
||||
}
|
||||
limit := options.MaxMemoryBytes
|
||||
if limit == 0 {
|
||||
limit = u3dDefaultBytes
|
||||
limit = basethreed.DefaultBytes
|
||||
}
|
||||
if limit <= 0 || uint64(len(sections)) >= uint64(limit)/136 {
|
||||
return fmt.Errorf("PDF 3D section memory exceeds limit")
|
||||
|
||||
Reference in new issue
Block a user