Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sof-logger: ensure NULL string is not passed to printf/fprintf
Due to allocation failures, or invalid content in dictionary, "params" entries in "struct proc_ldc_entry" may be NULL. In print_entry_params(), the NULL entries may be passed as arguments to fprintf(). While e.g. glibc handles these without error, this is not guaranteed behaviour and may result in segfault on some platforms. Fix the issue by aborting program if allocation fails and explicitly handling the cases when asprintf_entry_text returns NULL. Signed-off-by: Kai Vehmanen <[email protected]> (cherry picked from commit 1a7a36a)
- Loading branch information