summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Hoffman <dj.hoffman@joyent.com>2014-06-13 22:48:27 +0000
committerDJ Hoffman <dj.hoffman@joyent.com>2014-06-23 17:24:34 +0000
commit5eeac4296e7d669c6f2fc9ab508ee2142895b3f8 (patch)
tree74480301c26f775e1d4cd61fd46d9fad821530b0
parent831213612a0b0745ba877851b61fea0a4c9ba42d (diff)
downloadillumos-joyent-5eeac4296e7d669c6f2fc9ab508ee2142895b3f8.tar.gz
OS-3103 lx_ldb_get_dyns32 doesn't properly handle NULL pointer inputs
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Reviewed by: Robert Mustacchi <rm@joyent.com>
-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..4fed303dd6 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 */