HomeFreeBSD

Add missing NULL checks when calling malloc(M_NOWAIT) in

Description

Add missing NULL checks when calling malloc(M_NOWAIT) in
bhnd_nv_strdup/bhnd_nv_strndup.

If malloc(9) failed during initial bhnd(4) attach, while allocating the root
NVRAM path string ("/"), the returned NULL pointer would be passed as the
destination to memcpy().

Reported by: Ilja Van Sprundel <ivansprundel@ioactive.com>

Details

Provenance
landonfAuthored on
Parents
rS331377: Merge from user/jeff/numa
Branches
Unknown
Tags
Unknown