diff options
author | np <np@FreeBSD.org> | 2010-07-23 22:24:25 +0000 |
---|---|---|
committer | np <np@FreeBSD.org> | 2010-07-23 22:24:25 +0000 |
commit | 06b03cfd4f74f39b8d108da0e5db259b26f9e501 (patch) | |
tree | 3ca885945a807021bae3a19f04361e2a1c52cc26 /cddl/contrib/opensolaris/tools | |
parent | e40d09e515faffb6b9ccd5f626601a6599c80ddd (diff) | |
download | FreeBSD-src-06b03cfd4f74f39b8d108da0e5db259b26f9e501.zip FreeBSD-src-06b03cfd4f74f39b8d108da0e5db259b26f9e501.tar.gz |
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
Diffstat (limited to 'cddl/contrib/opensolaris/tools')
-rw-r--r-- | cddl/contrib/opensolaris/tools/ctf/cvt/output.c | 2 |
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 ae8c594..0b04c48 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); } |