Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config_format: fix possible heap overflow (#7768)
The return value of `strchr` is not checked for failure. If it's failure then `tmp` will be `0` in the `(tmp-p)` calculation, causing `xlen` to be `p`. `xlen` is later used for copying memory by way of `memcpy` in string creation using `flb_sds_create_len`. This fixes it. Signed-off-by: David Korczynski <[email protected]>
- Loading branch information