mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Early return in readHeaderField
In the old version the outer loop won't terminate if `EndOfHeader` is a zero sized field.
This commit is contained in:
@@ -192,10 +192,11 @@ class DatabaseHeaderKDBX(private val databaseV4: DatabaseKDBX) : DatabaseHeader(
|
||||
}
|
||||
}
|
||||
|
||||
if (fieldID == PwDbHeaderV4Fields.EndOfHeader)
|
||||
return true
|
||||
|
||||
if (fieldData != null)
|
||||
when (fieldID) {
|
||||
PwDbHeaderV4Fields.EndOfHeader -> return true
|
||||
|
||||
PwDbHeaderV4Fields.CipherID -> setCipher(fieldData)
|
||||
|
||||
PwDbHeaderV4Fields.CompressionFlags -> setCompressionFlags(fieldData)
|
||||
|
||||
Reference in New Issue
Block a user