Print this page
smatch clean rtld
*** 1718,1728 ****
* should any failures occur.
*/
rtsz = S_DROUND(sizeof (Rt_map));
epsz = S_DROUND(sizeof (Rt_elfp));
lmsz = rtsz + epsz + dynsz;
! if ((lmp = calloc(lmsz, 1)) == NULL)
return (NULL);
ELFPRV(lmp) = (void *)((uintptr_t)lmp + rtsz);
DYNINFO(lmp) = (Dyninfo *)((uintptr_t)lmp + rtsz + epsz);
LMSIZE(lmp) = lmsz;
--- 1718,1728 ----
* should any failures occur.
*/
rtsz = S_DROUND(sizeof (Rt_map));
epsz = S_DROUND(sizeof (Rt_elfp));
lmsz = rtsz + epsz + dynsz;
! if ((lmp = calloc(1, lmsz)) == NULL)
return (NULL);
ELFPRV(lmp) = (void *)((uintptr_t)lmp + rtsz);
DYNINFO(lmp) = (Dyninfo *)((uintptr_t)lmp + rtsz + epsz);
LMSIZE(lmp) = lmsz;
*** 2353,2363 ****
* family searches.
*/
if (CAPCHAIN(lmp)) {
Capchain *capchain;
! if ((capchain = calloc(CAPCHAINSZ(lmp), 1)) == NULL)
return (NULL);
(void) memcpy(capchain, CAPCHAIN(lmp), CAPCHAINSZ(lmp));
CAPCHAIN(lmp) = capchain;
}
--- 2353,2363 ----
* family searches.
*/
if (CAPCHAIN(lmp)) {
Capchain *capchain;
! if ((capchain = calloc(1, CAPCHAINSZ(lmp))) == NULL)
return (NULL);
(void) memcpy(capchain, CAPCHAIN(lmp), CAPCHAINSZ(lmp));
CAPCHAIN(lmp) = capchain;
}