You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func appendPageBoxesInfo(...) {
...
mb := pb.MediaBox() // here mb may be nil
cb := pb.CropBox()
if cb == nil || mb.equals(*cb) {// here mb is dereferenced and it may lead to panic
appendEqualMediaAndCropBoxInfo(ss, pb, unit, currUnit)
return
}
appendNotEqualMediaAndCropBoxInfo(ss, pb, unit, currUnit)
func (pb PageBoundaries) MediaBox() *Rectangle { // may return nil value
if pb.Media == nil {
return nil
}
return pb.Media.Rect
}
Hello
This warning found with the Svace.
There is mb can be nil. It can lead to panic.
pdfcpu/pkg/pdfcpu/info.go
Line 254 in 281745f
due to
pdfcpu/pkg/pdfcpu/boxes.go
Line 86 in 281745f
mb is dereferenced here
pdfcpu/pkg/pdfcpu/info.go
Line 256 in 281745f
The text was updated successfully, but these errors were encountered: