Skip to content

Commit

Permalink
OS-3103 lx_ldb_get_dyns32 doesn't properly handle NULL pointer inputs
Browse files Browse the repository at this point in the history
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
  • Loading branch information
DJ Hoffman committed Jun 23, 2014
1 parent 8312136 commit 5eeac42
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions usr/src/lib/brand/lx/librtld_db/common/lx_librtld_db.c
Expand Up @@ -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 */
Expand Down

0 comments on commit 5eeac42

Please sign in to comment.