]> git.ipfire.org Git - thirdparty/suricata.git/commit
jsonbuilder: check buffer growth
authorJason Ish <jason.ish@oisf.net>
Wed, 24 May 2023 23:05:34 +0000 (17:05 -0600)
committerVictor Julien <vjulien@oisf.net>
Tue, 30 May 2023 10:21:05 +0000 (12:21 +0200)
commit33827beae56c668149290fce5f6ff3dcd8bbfe38
tree14e4eb2b626d5d13d568827a05e999324435a793
parent95cfc2b34fc93873daf881b5e1469e7dd68e9521
jsonbuilder: check buffer growth

Use try_reserve before growing the internal buffer, and the internal
state vector. This allows allocation errors to be caught and an error
returned instead of just aborting the process.

Ticket: #6057
rust/src/dns/log.rs
rust/src/jsonbuilder.rs
rust/src/pgsql/logger.rs