summaryrefslogtreecommitdiff
path: root/libdwfl/find-debuginfo.c
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2015-05-30 23:38:28 +0200
committerMark Wielaard <mjw@redhat.com>2015-06-05 14:44:59 +0200
commit5ad751b089896fbc5198485080eea5d1a8bd192b (patch)
tree365e68e2784c2ccdc6ef3ebd1676a93fd8252bd4 /libdwfl/find-debuginfo.c
parent7ec8d27033bea05ce1be4601e6784134c4a66c9f (diff)
downloadelfutils-5ad751b089896fbc5198485080eea5d1a8bd192b.tar.gz
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>
Diffstat (limited to 'libdwfl/find-debuginfo.c')
-rw-r--r--libdwfl/find-debuginfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c
index ac9a5e50..9b911c1e 100644
--- a/libdwfl/find-debuginfo.c
+++ b/libdwfl/find-debuginfo.c
@@ -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. */