Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
in_stdin_collect tests !ctx->parser to decide whether a parser is associated with the context or not. The problem with that check is ctx->parser is not explictily initialized in in_stdin_init and the malloc allocation does not guarantee that the memory assigned to ctx, and ctx->parser is zero initialized. This then will lead to undefined behavior where sometimes the ctx->parser will not be 0 and a non existing parser used. Errors like fluent#4544 will then pop up randomly. This fix was validated with valgrind and the example provided in fluent#4544 Signed-off-by: Paulo Neves <[email protected]>
- Loading branch information