From 06b03cfd4f74f39b8d108da0e5db259b26f9e501 Mon Sep 17 00:00:00 2001 From: np Date: Fri, 23 Jul 2010 22:24:25 +0000 Subject: 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 --- cddl/contrib/opensolaris/tools/ctf/cvt/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cddl') 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); } -- cgit v1.1