mirror of
https://github.com/openharmony/third_party_elfutils.git
synced 2026-07-19 19:43:34 -04:00
libdwfl: Check file_name is not NULL before calling canonicalize_file_name.
canonicalize_file_name is marked as taking a nonnull argument. Signed-off-by: Mark Wielaard <mjw@redhat.com>
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2015-05-30 Mark Wielaard <mjw@redhat.com>
|
||||
|
||||
* find-debuginfo.c (dwfl_standard_find_debuginfo): Check file_name is
|
||||
not NULL before calling canonicalize_file_name.
|
||||
|
||||
2015-05-24 Mark Wielaard <mjw@redhat.com>
|
||||
|
||||
* derelocate.c (check_module): Check mod is not NULL.
|
||||
|
||||
@@ -357,7 +357,7 @@ dwfl_standard_find_debuginfo (Dwfl_Module *mod,
|
||||
debuglink_file, debuglink_crc,
|
||||
debuginfo_file_name);
|
||||
|
||||
if (fd < 0 && errno == 0)
|
||||
if (fd < 0 && errno == 0 && file_name != NULL)
|
||||
{
|
||||
/* If FILE_NAME is a symlink, the debug file might be associated
|
||||
with the symlink target name instead. */
|
||||
|
||||
Reference in New Issue
Block a user