Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a NULL pointer access when boot components are uncompressed
When boot components are not compressed, their names do not have any file extension. When checking whether a component is a GZIP file, code in payload.c calls function isgzip(s) with `s' being a component name. The name is passed to ext() which returns NULL if no extension is present. The result is directly passed by isgzip() to str_cmp() and would cause a NULL pointer access in the latter function. Fix this by updating function isgzip() to check a result from the ext() call. For consistency, update similarly function basename() in the same file.
- Loading branch information