Tags: getenu/flatty
Tags
fix(security): bounds-check length prefixes on decode Untrusted flatty input (bytes off the network) could name a length far larger than the buffer. The seq/string/table/set decoders trusted it and setLen/copyMem'd against it -- a hostile packet triggered either a huge allocation (OOM) or a copyMem heap over-read (SIGSEGV, which no try/except catches). Validate every count against the bytes that actually remain before allocating or copying; reject bad buffers with a new FlattyError (a CatchableError) so trust boundaries drop the input instead of crashing. Holds even under -d:danger, where Nim's own bounds checks are off. Bump to 0.4.1.
Merge pull request treeform#28 from guzba/master 0.2.4 ptr UncheckedArray[uint8] binny reading
Merge pull request treeform#26 from guzba/master updated github workflow
Merge pull request treeform#23 from guzba/master fix for nim issue #10128
PreviousNext