The PR adds a length check on the len parameter of ll2ascii(). If someone passes a len value of CCNL_LLADDR_STR_MAX_LEN + 2 to the function it basically overflows the out buffer (created inside the function). It also adds some documentation which clarifies why passing a string of "ffff...ff" to the ll2ascii function does not result in a string of "ff:ff:...ff"
Issues/PRs references
See also PR #333 for the initial discussion on documentation in test_ll2ascii_valid()
Contribution description
The PR adds a length check on the
len
parameter ofll2ascii()
. If someone passes alen
value ofCCNL_LLADDR_STR_MAX_LEN + 2
to the function it basically overflows theout
buffer (created inside the function). It also adds some documentation which clarifies why passing a string of "ffff...ff" to thell2ascii
function does not result in a string of "ff:ff:...ff"Issues/PRs references
See also PR #333 for the initial discussion on documentation in
test_ll2ascii_valid()