]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
libdwfl: Check file_name is not NULL before calling canonicalize_file_name.
authorMark Wielaard <mjw@redhat.com>
Sat, 30 May 2015 21:38:28 +0000 (23:38 +0200)
committerMark Wielaard <mjw@redhat.com>
Fri, 5 Jun 2015 12:44:59 +0000 (14:44 +0200)
canonicalize_file_name is marked as taking a nonnull argument.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
libdwfl/ChangeLog
libdwfl/find-debuginfo.c

index dec3405bea7f1b89eccb246f7581e3b397b1c7c8..ffb34c034c0a0394ec56b000464ece16a531667e 100644 (file)
@@ -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.
index ac9a5e50fe51c8db73d3cc26b830252bb578a0f8..9b911c1e7718e37e50ee08dbdb750b57a5f7cff1 100644 (file)
@@ -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.  */