fix panic when rdb checksum is disabled (#424)

v4
menwen 3 years ago committed by GitHub
parent 308edc3a4c
commit c3a342db54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/pkg/rdb/loader.go

@ -49,6 +49,8 @@ func (l *Loader) Footer() error {
crc1 := l.crc.Sum64()
if crc2, err := l.readUint64(); err != nil {
return err
} else if crc2 == 0 {
log.Info("RDB file was saved with checksum disabled: no check performed.")
} else if crc1 != crc2 {
return errors.Errorf("checksum validation failed")
}

Loading…
Cancel
Save