mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-11-29 21:33:07 -08: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:
1 file changed
+3
-2
@@ -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