Check the value length before calculating the buffer capacity to prevent integer overflow when adding the metadata length. Fixes potential allocation failures reported by CodeQL. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Check the value length before calculating the buffer capacity to prevent integer overflow when adding the metadata length. Fixes potential allocation failures reported by CodeQL. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>