HomeFreeBSD

- Use calloc instead of malloc + memset

Description

  • Use calloc instead of malloc + memset
  • Fix really busted logic proposed in r295191. Use asprintf instead of malloc, then strlcpy to circumvent the warning correctly by automatically creating the right sized buffer. The proposed change I committed was broken from the get-go because it was running strlen on an improperly initialized buffer, so it would have always segfaulted [*]

Reported by: bde [*]

Details

Provenance
ngieAuthored on
Parents
rS295239: Declare _bsnmptools_debug as extern in bsnmptools.h instead of bsnmpmap.c to
Branches
Unknown
Tags
Unknown