mirror of
https://github.com/minio/minio.git
synced 2025-11-20 09:56:07 -05:00
Add validation of xlMeta ErasureInfo field (#5389)
This commit is contained in:
@@ -269,7 +269,7 @@ func readXLMetaStat(disk StorageAPI, bucket string, object string) (si statInfo,
|
||||
xlFormat := parseXLFormat(xlMetaBuf)
|
||||
|
||||
// Validate if the xl.json we read is sane, return corrupted format.
|
||||
if !isXLMetaValid(xlVersion, xlFormat) {
|
||||
if !isXLMetaFormatValid(xlVersion, xlFormat) {
|
||||
// For version mismatchs and unrecognized format, return corrupted format.
|
||||
return si, nil, errors2.Trace(errCorruptedFormat)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user