]> git.ipfire.org Git - thirdparty/suricata.git/commit
jsonbuilder: fix serialization of nan and inf 10774/head
authorJason Ish <jason.ish@oisf.net>
Fri, 5 Apr 2024 14:35:36 +0000 (08:35 -0600)
committerJason Ish <jason.ish@oisf.net>
Fri, 5 Apr 2024 15:29:01 +0000 (09:29 -0600)
commit71f59e529c3ceaba977ec5d3492bb8b3d3184cd1
treeec8d3bd8c397321f3a3a9b85ab2447b3df1dc43c
parentb224209f45317abfbea1a1f43f17fa63ae904745
jsonbuilder: fix serialization of nan and inf

When outputting a float, check if its infinity, or not a number and
output a null instead.

Using a null was chosen as this is what serde_yaml, Firefox, Chrome,
Node, etc. do.

Ticket: #6921
rust/src/jsonbuilder.rs