Changeset df7dc9e in mainline for boot/grub/meson.build

Timestamp:
2020-05-26T18:22:56Z (4 years ago)
Author:
Petr Pavlu <setup@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f5a7773d
Parents:
145a13b
git-author:
Petr Pavlu <setup@…> (2020-05-25 20:47:43)
git-committer:
Petr Pavlu <setup@…> (2020-05-26 18:22:56)
Message:

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.

(No files)

Note: See TracChangeset for help on using the changeset viewer.