(fix): #8408 fixes a bug where the capacity of the buffer isnt verified before trying to verify the ID (#8413)

This commit is contained in:
mustiikhalil
2024-10-05 00:16:41 +02:00
committed by GitHub
parent b127c57ff0
commit d7a70db6ac
3 changed files with 17 additions and 0 deletions

View File

@@ -19,6 +19,8 @@ import Foundation
/// Collection of thrown from the Flatbuffer verifier
public enum FlatbuffersErrors: Error, Equatable {
/// Thrown when trying to verify a buffer that doesnt have the length of an ID
case bufferDoesntContainID
/// Thrown when verifying a file id that doesnt match buffer id
case bufferIdDidntMatchPassedId
/// Prefixed size doesnt match the current (readable) buffer size