]> 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]>
Wed, 13 Sep 2017 11:25:44 +0000 (12:25 +0100)
commitb1928b44a51455706bcfcce676e5e79571f65ae3
treeb257f54d3cc3088ee6daae81c5ae2ca1274bfc46
parent761e1c46996b388e5ab00bf5e0fe2148be163c16
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