]> The Tcpdump Group git mirrors - tcpdump/commit
That array only needs 16 elements.
authorGuy Harris <[email protected]>
Thu, 16 Feb 2017 00:20:33 +0000 (16:20 -0800)
committerDenis Ovsienko <[email protected]>
Sun, 3 Sep 2017 23:08:58 +0000 (00:08 +0100)
commit0d838a844f41903bb935167960505153a89e2fa7
treed9e26e7efa8463dd48ec4b1fdf73ab2ab8894f32
parent6a46b2adfb2a46cf3eea71fe76617fea346d3602
That array only needs 16 elements.

No need for a 17th null terminator.

This might, or might not, give Coverity a clue that

u_char *p;

hex[*p >> 4]
hex[*p & 0xf]

are both safe, no matter how "tainted" p is, because if you shift an
8-bit unsigned value right 4 bits, the result is between 0 and 15.  (See
CID 1206732.)
addrtoname.c