Skip to content

Commit 82fef14

Browse files
artemseleznevArtem Seleznev
andauthored
Svace static analyzer fix (#562)
Co-authored-by: Artem Seleznev <[email protected]>
1 parent 06d7bd9 commit 82fef14

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

v3/control.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,9 @@ func DecodeControl(packet *ber.Packet) (Control, error) {
673673
c := &ControlVChuPasswordMustChange{MustChange: true}
674674
return c, nil
675675
case ControlTypeVChuPasswordWarning:
676+
if value == nil || value.Data == nil {
677+
return nil, fmt.Errorf("invalid value for Control Type ControlTypeVChuPasswordWarning: %v", value)
678+
}
676679
c := &ControlVChuPasswordWarning{Expire: -1}
677680
expireStr := ber.DecodeString(value.Data.Bytes())
678681

0 commit comments

Comments
 (0)