In icmp6_rrenum_print() function.
From:
router renumberingrouter renum: command
To:
router renumbering, command
Add a test file from the Wireshark menagerie (5691-icmpv6-RFC2894-RR.pcap).
Found with clang, CFLAGS=-fsanitize=memory.
Fix GitHub issues #848 and #849.
The problem is that for some unknown reason the pt buffer is not
initialized after EVP_DecryptUpdate() call, no error, in:
print-esp.c:260: if (!EVP_DecryptUpdate(ctx, pt, &len, ct, ctlen)) {
Enable ND_LONGJMP_FROM_TCHECK and remove the "trunc" labels.
Use ND_ICHECK_U() for length checks and add standard "invalid" sections.
Remove a ndo_ll_hdr_len increment in a truncation case.
Update chdlc_print() to a void function.
Remove a now useless variable.
l2info.cookie is not inside the packet - it's a copy of data from the
packet, with the copy doing the necessary bounds checking - so we
shouldn't use NT_TCHECK or GET macros on it.
In the loop searching through the cookie table, just search for a
matching entry and, if we find one, save the entry and break out of the
loop.
If we found a matching entry, process the cookie using that entry.
That way, the cookie processing isn't buried in a loop.
We should be using nd_ types in structures that are overlaid on packets,
so that we control the field offsets (as independently of the compiler
as possible) and to make it more difficult to fetch data fromt he packet
without using packet data accessor routines (to force bounds checking
and conversion from the appropriate byte order to host byte order as
necessary).
It seems possible that some old make implementations could have low
limits on the number and line length of Makefile rules, which would
explain the need for the awk code in mkdep in 1988.
That said, many still-used copies and derivatives of mkdep do not have
the awk code, which hints that either the problem no longer exists or
the workarounds have since settled elsewhere: most compilers that
Autoconf cares to use for dependency generation (GCC, Clang and XL C
16.1) produce dependency rules with long lines already nicely wrapped,
and even though SunStudio 11 produces plenty of short lines, the result
does not affect make on Solaris 9.
Since the only practical effect of the awk code seems to be a bug that
sometimes manifests in edge cases as explained in GH pull request #651,
instead of using a more complicated awk script (as in OpenLDAP) drop it
altogether (as in GCC) and presume the only practical effect to be
elimination of the bug unless proven otherwise.
(Same as in libpcap commit d62ed0c.)
Before:
$ make releasetar
tar: CONTRIBUTING: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
Cleaning...
$ make distclean
After:
$ make releasetar
tar: CONTRIBUTING: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
make: *** [Makefile:475: releasetar] Error 2