Fixes a couple of bugs reported in dlltool.
authorStephen Kitt <steve@sk2.org>
Fri, 29 May 2015 10:03:03 +0000 (11:03 +0100)
committerNick Clifton <nickc@redhat.com>
Fri, 29 May 2015 10:03:03 +0000 (11:03 +0100)
* dlltool.c (make_one_lib_file): Clear .idata$6 before use.
(main): Fail if the output file specified by the -z option cannot
be opened.

binutils/ChangeLog
binutils/dlltool.c

index 6bb1f1a9c90aa4868861920b5ce9bcc3aba2c29f..f681468eb8127a1d928ef755ab8516a36b134bf4 100644 (file)
@@ -1,3 +1,9 @@
+2015-05-29  Stephen Kitt  <steve@sk2.org>
+
+       * dlltool.c (make_one_lib_file): Clear .idata$6 before use.
+       (main): Fail if the output file specified by the -z option cannot
+       be opened.
+
 2015-05-18  Nick Clifton  <nickc@redhat.com>
 
        PR binutils/18420
index e83052ae3357464fb03ad67cd2df4783f67d6dda..6aa11dd33209b3eafe32b2b91662ef7f6831ad2b 100644 (file)
@@ -2783,6 +2783,7 @@ make_one_lib_file (export_type *exp, int i, int delay)
              else
                si->size = strlen (xlate (exp->import_name)) + 3;
              si->data = xmalloc (si->size);
+             memset (si->data, 0, si->size);
              si->data[0] = idx & 0xff;
              si->data[1] = idx >> 8;
              if (exp->its_name)
@@ -4151,6 +4152,9 @@ main (int ac, char **av)
          break;
        case 'z':
          output_def = fopen (optarg, FOPEN_WT);
+         if (!output_def)
+           /* xgettext:c-format */
+           fatal (_("Unable to open def-file: %s"), optarg);
          break;
        case 'D':
          dll_name = (char*) lbasename (optarg);
This page took 0.02724 seconds and 4 git commands to generate.