fix NPE in aout_find_nearest_line

This commit is contained in:
Bebbo 2018-06-06 09:32:21 +02:00
parent 81e03077bd
commit d1a4cccf82
4 changed files with 7 additions and 3 deletions

View File

@ -2971,6 +2971,10 @@ NAME(aout,find_nearest_line)
strcpy (buf, function);
else
{
if (buf == NULL)
{
buf = (char *)malloc(strlen(function + 2));
}
buf[0] = bfd_get_symbol_leading_char (abfd);
strcpy (buf + 1, function);
}

2
bfd/configure vendored
View File

@ -3468,7 +3468,7 @@ bfd_version=`echo "${VERSION}" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\
bfd_version_string="\"${VERSION}\""
if test x${is_release} = x; then
bfd_version_date=`sed -n -e 's/.*DATE //p' < ${srcdir}/version.h`
bfd_version_string="\"${VERSION} ${bfd_version_date} (adtools build 20080628)\""
bfd_version_string="\"${VERSION} ${bfd_version_date}\""
fi

View File

@ -18,7 +18,7 @@ changequote([,])dnl
bfd_version_string="\"${VERSION}\""
if test x${is_release} = x; then
bfd_version_date=`sed -n -e 's/.*DATE //p' < ${srcdir}/version.h`
bfd_version_string="\"${VERSION} ${bfd_version_date} (adtools build 20080628)\""
bfd_version_string="\"${VERSION} ${bfd_version_date}\""
fi
AC_SUBST(bfd_version)
AC_SUBST(bfd_version_string)

View File

@ -1,3 +1,3 @@
#define BFD_VERSION_DATE 20180118
#define BFD_VERSION_DATE 20180606
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_string@