Commit 1e55072
committed
in_systemd: improve error handling
This patch addresses three issues:
- Add NULL check after flb_strndup to prevent potential segfault
when memory allocation fails
- Add type validation for msgpack object before accessing map
fields to prevent undefined behavior with non-map data
- Fix FLUENT_BIT_PARSER counting toward max_fields limit by
returning -1 instead of 0
Signed-off-by: Nour Douffir <[email protected]>1 parent 637a784 commit 1e55072
1 file changed
+18
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
| |||
215 | 220 | | |
216 | 221 | | |
217 | 222 | | |
218 | | - | |
| 223 | + | |
| 224 | + | |
219 | 225 | | |
220 | | - | |
| 226 | + | |
221 | 227 | | |
222 | 228 | | |
223 | 229 | | |
| |||
423 | 429 | | |
424 | 430 | | |
425 | 431 | | |
426 | | - | |
427 | | - | |
428 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
429 | 441 | | |
430 | | - | |
431 | 442 | | |
432 | 443 | | |
433 | 444 | | |
| |||
0 commit comments