Appending to a string using snprintf inside a loop can be problematic
because you have to ensure that your start offset stays within the
bounds of your buffer and that your size (which is unsigned) doesn't
overflow. Switch to a wmem_strbuf.
Fixes#18527
The deprecated Host Name Address Parameter, RFC 9260 3.3.2.1.4:
"At least one null terminator is included in the Host Name string
and MUST be included in the length."
That makes it a string which is both counted and null-terminated,
which is a FT_STRINGZ. Return the string as obtained rather than
formatting it a second time. Don't pass in a width as a format specifier,
because the length of the UTF-8 string is not necessarily the length
in octets, if replacement characters or escaping was used.
Fix#18534.
Both specifications say: "The FQDN field encoding shall be identical
to the encoding of a FQDN within a DNS message of section 3.1 of IETF
RFC 1035 [31] but excluding the trailing zero byte."
Since it's only one name, that probably means that compression is
impossible, and indeed the dissectors already check and assume that
if the first byte is in the letter range, that it's probably incorrectly
directly encoded as a dotted string instead of DNS-style.
Since compression isn't supported, use ENC_APN_STR to avoid generating
bogus UTF-8 in packets with errors.
Fix#18531
Reduce the amount of platform specific Wireshark code by using
GIOChannel watch, i.e. do not use UNIX specific GLib functionality and
do not peek into pipe every 100 ms on Windows.
WOW has several 4 octet ASCII strings in reverse order. g_strreverse
does not work on UTF-8 multibyte characters, such as REPLACEMENT
CHARACTER when there are errors. Reverse the string buffer before
converting from ASCII.
Fix#18529
Addresses clang-analyzer warning:
"packet-couchbase.c:2636:7: warning: Value stored to 'offset' is never read"
Change-Id: Ib91fbd64e08f65cbe83887ebdf5b6ae545672bc5
The RPM packages use a versioned build directory, which creates problems
for ccache. The APT packages simply take a long time to build. Switch
both to a twice-daily schedule so that we don't set fire to CI minutes
in parallel with every merge.
Back out a recent CMake change since it's no longer needed.
For EMI and UCP, the encoding for alphanumeric messages, as
specified in ETS 300 133-3 as well as the EMI extension
specification, is rather unique: GSM 7-bit alphabet characters
are each translated (thus unpacked) to two hex byte IRA characters
(same as ASCII over the 0-9 A-F range), with '/' used as an
end of string indicator.
Translate the hex bytestring to bytes, and then convert the bytes
using the unpacked GSM 7-bit alphabet instead of treating them
as ASCII or UTF-8. Check for invalid bytes which are not ASCII hex
and replace them in the final returned string with the UTF-8
replacement character. Fix#18518 better.