diff options
author | Stephen Kitt <steve@sk2.org> | 2015-05-29 11:03:03 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2015-05-29 11:03:03 +0100 |
commit | 030f4c7f08246bdc79d74c4c297729003773b67c (patch) | |
tree | 162d48c62cf4399de10b0f9a21d69ddc4c45210f /binutils/dlltool.c | |
parent | 4fb18d37fdcbf3756ce9018e68f1bdc40d4abc1f (diff) | |
download | gdb-030f4c7f08246bdc79d74c4c297729003773b67c.zip gdb-030f4c7f08246bdc79d74c4c297729003773b67c.tar.gz gdb-030f4c7f08246bdc79d74c4c297729003773b67c.tar.bz2 |
Fixes a couple of bugs reported in dlltool.
* 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.
Diffstat (limited to 'binutils/dlltool.c')
-rw-r--r-- | binutils/dlltool.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/binutils/dlltool.c b/binutils/dlltool.c index e83052a..6aa11dd 100644 --- a/binutils/dlltool.c +++ b/binutils/dlltool.c @@ -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); |