mirror of
https://github.com/taigrr/bitcask
synced 2025-01-18 04:03:17 -08:00
Fix a bug when MaxValueSize == 0 on Merge operations
This commit is contained in:
@@ -34,7 +34,7 @@ func readKeyBytes(r io.Reader, maxKeySize uint32) ([]byte, error) {
|
||||
return nil, errors.Wrap(errTruncatedKeySize, err.Error())
|
||||
}
|
||||
size := binary.BigEndian.Uint32(s)
|
||||
if size > uint32(maxKeySize) {
|
||||
if maxKeySize > 0 && size > uint32(maxKeySize) {
|
||||
return nil, errKeySizeTooLarge
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user