in_stdin: fix handling of invalid payload (MSVR 47959)
in_stdin: fix handling of invalid payload (MSVR 47959)

On specific bad formed payloads, Fluent Bit crashes when reading data using
the standard input plugin.

The following patch unify the validation of the record types and only packs
valid JSON maps or arrays, for data from a different type it just triggers
and error.

note: Issue reported by Microsoft, Secutiry Vulnerability Report 47959

Signed-off-by: Eduardo Silva <81f705dc2ce1a61a2621e0e4b442a9474e1d0c70@treasure-data.com>

fluent/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit