diff options
author | Nick Clifton <nickc@redhat.com> | 2018-05-14 13:05:02 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2018-05-14 13:05:02 +0100 |
commit | c3533c4c7c5db84b27e4dc8994a3c3a893077c03 (patch) | |
tree | d024b1abd92c1df2038593d7ef4f3b7e0eff2e57 /gas/as.c | |
parent | 4ec0995016801cc5d5cf13baf6e10163861e6852 (diff) | |
download | fsf-binutils-gdb-c3533c4c7c5db84b27e4dc8994a3c3a893077c03.zip fsf-binutils-gdb-c3533c4c7c5db84b27e4dc8994a3c3a893077c03.tar.gz fsf-binutils-gdb-c3533c4c7c5db84b27e4dc8994a3c3a893077c03.tar.bz2 |
Fix a problem in the assembler when checking for overlapping input and output files on non-POSIX compliant systems.
PR 23153
* as.c (main): When checking for an output file that is also an
input file, also check that the inode is not zero.
Diffstat (limited to 'gas/as.c')
-rw-r--r-- | gas/as.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1256,7 +1256,7 @@ main (int argc, char ** argv) if (stat (argv[i], &sib) == 0) { - if (sib.st_ino == sob.st_ino) + if (sib.st_ino == sob.st_ino && sib.st_ino != 0) { /* Don't let as_fatal remove the output file! */ out_file_name = NULL; |