From 5eeac4296e7d669c6f2fc9ab508ee2142895b3f8 Mon Sep 17 00:00:00 2001 From: DJ Hoffman Date: Fri, 13 Jun 2014 22:48:27 +0000 Subject: OS-3103 lx_ldb_get_dyns32 doesn't properly handle NULL pointer inputs Reviewed by: Jerry Jelinek Reviewed by: Robert Mustacchi --- usr/src/lib/brand/lx/librtld_db/common/lx_librtld_db.c | 6 ++++-- 1 file 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 */ -- cgit v1.2.3