Re: [Qemu-devel] [PATCH 48/56] json: Enforce token count and size limits more tightly

2018-08-16 Thread Eric Blake
On 08/08/2018 07:03 AM, Markus Armbruster wrote: Token count and size limits exist to guard against excessive heap usage. We check them only after we created the token on the heap. That's assigning a cowboy to the barn to lasso the horse after it has bolted. Close the barn door instead: check b

[Qemu-devel] [PATCH 48/56] json: Enforce token count and size limits more tightly

2018-08-08 Thread Markus Armbruster
Token count and size limits exist to guard against excessive heap usage. We check them only after we created the token on the heap. That's assigning a cowboy to the barn to lasso the horse after it has bolted. Close the barn door instead: check before we create the token. Signed-off-by: Markus A