Skip to content

Commit 4ddf265

Browse files
committed
Added additional KVE header check
1 parent 3c44d76 commit 4ddf265

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils/src/kve/kve_storage.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,9 @@ size_t kveStorageFindNextItem(kveMemory_t *kve, size_t address)
237237
if (header.full_length == KVE_END_TAG) {
238238
return KVE_STORAGE_INVALID_ADDRESS;
239239
}
240-
240+
if (header.full_length == 0) {
241+
return KVE_STORAGE_INVALID_ADDRESS;
242+
}
241243
if (header.key_length != 0) {
242244
return currentAddress;
243245
}

0 commit comments

Comments
 (0)