Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src/install: assert not expanding unset manifest filename
During manifest file parsing, we ensure that filename is set and allow an unset filename only for an install hook. Thus having filename unset after checking this conditition is a programming error here. Split the prior single condition into two and check the unexpected case with g_assert_not_reached() to signal that reaching this must be a programming error. Fixes coverity warning: | CID 1465767 (#1 of 1): Dereference after null check (FORWARD_NULL) | 20. var_deref_model: Passing null pointer mfimage->filename to g_file_test, which dereferences it. Fixes 8a9c921 which added this check: + /* skip source image checks if filename is not set (install hook) */ + if (!mfimage->filename && mfimage->hooks.install) + goto skip_filename_checks; + that lets coverity assume we explicitly pass here in case of mfimage->filename being null: | 17. var_compare_op: Comparing mfimage->filename to null implies that mfimage->filename might be null. Signed-off-by: Enrico Joerns <[email protected]>
- Loading branch information