summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libasm/ChangeLog5
-rw-r--r--libasm/asm_begin.c4
-rw-r--r--src/ChangeLog4
-rw-r--r--src/strip.c6
4 files changed, 15 insertions, 4 deletions
diff --git a/libasm/ChangeLog b/libasm/ChangeLog
index beb6211c..a8ac2c7c 100644
--- a/libasm/ChangeLog
+++ b/libasm/ChangeLog
@@ -1,3 +1,8 @@
+2016-02-12 Mark Wielaard <mjw@redhat.com>
+
+ * asm_begin.c (prepare_text_output): Only call __fsetlocking when
+ result isn't NULL.
+
2015-10-05 Josh Stone <jistone@redhat.com>
* Makefile.am (libasm.so): Add AM_V_CCLD and AM_V_at silencers.
diff --git a/libasm/asm_begin.c b/libasm/asm_begin.c
index ff4d94c2..dc83cd8b 100644
--- a/libasm/asm_begin.c
+++ b/libasm/asm_begin.c
@@ -58,8 +58,8 @@ prepare_text_output (AsmCtx_t *result)
free (result);
result = NULL;
}
-
- __fsetlocking (result->out.file, FSETLOCKING_BYCALLER);
+ else
+ __fsetlocking (result->out.file, FSETLOCKING_BYCALLER);
}
return result;
diff --git a/src/ChangeLog b/src/ChangeLog
index 1c935d95..29782404 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2016-02-12 Mark Wielaard <mjw@redhat.com>
+
+ * strip.c (handle_elf): Correct elf_assert shndxdata check.
+
2016-02-09 Mark Wielaard <mjw@redhat.com>
* readelf.c (read_encoded): Move up.
diff --git a/src/strip.c b/src/strip.c
index 06d7cfd8..a6042445 100644
--- a/src/strip.c
+++ b/src/strip.c
@@ -1267,8 +1267,10 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
shndxdata = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn,
NULL);
- elf_assert ((versiondata->d_size / sizeof (Elf32_Word))
- >= shdr_info[cnt].data->d_size / elsize);
+ elf_assert (shndxdata != NULL
+ && shndxdata->d_buf != NULL
+ && ((shndxdata->d_size / sizeof (Elf32_Word))
+ >= shdr_info[cnt].data->d_size / elsize));
}
if (shdr_info[cnt].version_idx != 0)