aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/tools
diff options
context:
space:
mode:
authorNavdeep Parhar <np@FreeBSD.org>2010-07-23 22:24:25 +0000
committerNavdeep Parhar <np@FreeBSD.org>2010-07-23 22:24:25 +0000
commit96d1cd18791cb79b23d6825b0e44203a9385527b (patch)
tree3ca885945a807021bae3a19f04361e2a1c52cc26 /cddl/contrib/opensolaris/tools
parentd48dda1244c0a0b4fc493783d5f6b01701911ea7 (diff)
downloadsrc-96d1cd18791cb79b23d6825b0e44203a9385527b.tar.gz
src-96d1cd18791cb79b23d6825b0e44203a9385527b.zip
Catch up with r210324. d_buf will be NULL for SHT_NOBITS sections, do not
attempt to copy from it in that case. MFC after: 1 month
Notes
Notes: svn path=/head/; revision=210438
Diffstat (limited to 'cddl/contrib/opensolaris/tools')
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/cvt/output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/output.c b/cddl/contrib/opensolaris/tools/ctf/cvt/output.c
index ae8c5945c8ef..0b04c4827724 100644
--- a/cddl/contrib/opensolaris/tools/ctf/cvt/output.c
+++ b/cddl/contrib/opensolaris/tools/ctf/cvt/output.c
@@ -644,7 +644,7 @@ write_file(Elf *src, const char *srcname, Elf *dst, const char *dstname,
}
#if !defined(sun)
- if (ddata->d_buf == NULL) {
+ if (ddata->d_buf == NULL && sdata->d_buf != NULL) {
ddata->d_buf = xmalloc(shdr.sh_size);
bcopy(sdata->d_buf, ddata->d_buf, shdr.sh_size);
}