]> The Tcpdump Group git mirrors - tcpdump/commit
Make the hex-dumping routines for addresses take a uint8_t * argument.
authorGuy Harris <[email protected]>
Mon, 14 May 2018 08:52:54 +0000 (01:52 -0700)
committerGuy Harris <[email protected]>
Mon, 14 May 2018 08:52:54 +0000 (01:52 -0700)
commitdb3f9f277f4283318a760791dac2bed9507b4793
treeb2e2f9de6a1d6a2abfed6c6f254ca60a738aeadd
parent6daf3a543ec058d04e78018d0639b0a7c7494bfa
Make the hex-dumping routines for addresses take a uint8_t * argument.

Hopefully, that will convince Coverity that the result of dereferencing
those pointers will have a value between 0x00 and 0xff, and therefore
that shifting that result right by 4 bits will yield a value between 0x0
and 0xf, and therefore that this result can safely be used as an index
into the 16-element hex[] array.

I guess Coverity wants us to realize that there really *are* C
implementations out there with non-8-bit char and unsigned char values,
even though getting tcpdump to work on them will probably be a highly
entertaining exercise (not to mention that the only one I know of that's
actually being *used* are the Unisys Clearpath Dorado series, and
they're one's complement, which is yet *another* place where the port
could be entertaining...).
addrtoname.c
addrtoname.h