HomeFreeBSD

lm_load: fix string copying issues

Description

lm_load: fix string copying issues

  • Ensure section doesn't overrun section by using strlcpy instead of strcpy [*].
  • Use strdup instead of malloc + strcpy (this wasn't flagged by Coverity, but is an opportunistic change).

MFC after: 1 week
Reported by: Coverity
CID: 1006826 [*]

Details

Provenance
ngieAuthored on
Parents
rS311377: Redo fix for CID 979581
Branches
Unknown
Tags
Unknown