• Phil Sutter's avatar
    lib/ll_addr: improve ll_addr_n2a() a bit · f63ed3e6
    Phil Sutter authored
    Apart from making the code a bit more compact and efficient, this also
    prevents a potential buffer overflow if the passed buffer is really too
    small: Although correctly decrementing the size parameter passed to
    snprintf, it could become negative which would then wrap since snprintf
    uses (unsigned) size_t for the parameter.
    Signed-off-by: default avatarPhil Sutter <phil@nwl.cc>
    f63ed3e6
ll_addr.c 1.97 KB