summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Hoffman <dj.hoffman@joyent.com>2014-06-13 10:19:22 -0700
committerDJ Hoffman <dj.hoffman@joyent.com>2014-06-13 10:19:22 -0700
commit3d496fef322b05e3ff9f833ce5599c1181c7f509 (patch)
tree2f575ca918a3cd40c63e7436115ffbbea53eef4b
parent1e5edff9b07258924d1328154f6531a880ef31f6 (diff)
downloadillumos-joyent-3d496fef322b05e3ff9f833ce5599c1181c7f509.tar.gz
OS-3103 lx_ldb_get_dyns32 doesn't properly handle NULL pointer inputs
-rw-r--r--usr/src/lib/brand/lx/librtld_db/common/lx_librtld_db.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/src/lib/brand/lx/librtld_db/common/lx_librtld_db.c b/usr/src/lib/brand/lx/librtld_db/common/lx_librtld_db.c
index 86163df25e..49be6a9a03 100644
--- a/usr/src/lib/brand/lx/librtld_db/common/lx_librtld_db.c
+++ b/usr/src/lib/brand/lx/librtld_db/common/lx_librtld_db.c
@@ -205,8 +205,10 @@ lx_ldb_get_dyns32(rd_helper_data_t rhd,
* success and pass back the unmolested dynamic elements that
* we've already obtained.
*/
- *dynpp = dynp;
- *dynpp_sz = dynp_sz;
+ if(dynpp != NULL)
+ *dynpp = dynp;
+ if(dynpp_sz != NULL)
+ *dynpp_sz = dynp_sz;
ndyns = dynp_sz / sizeof (Elf32_Dyn);
/* If this isn't a dynamic object, there's nothing left todo */