enarx / ciborium

CBOR utilities
Other
222 stars 54 forks source link

fix: invalid allocation requests #118

Closed ahmedcharles closed 4 months ago

ahmedcharles commented 4 months ago

Invalid data can lead to allocating too much memory. Only preallocate up to 1024 Value objects.

Fixes: #115

rjzak commented 4 months ago

Fantastic! Just looks like clippy doesn't like an unused import.

ahmedcharles commented 4 months ago

Sorry, I had an interim fix that used size_of but decided to go with something simpler.