Commit Graph

85617 Commits

Author SHA1 Message Date
Gerald Combs 94b4202a99 GIOP: Handle recursion and large loops.
dissect_data_for_typecode_with_params is recursive. Add a depth check.
It also has large loops. Make sure our offsets advance.
Fixes #18392.
2022-10-16 22:09:32 +00:00
Bin Peng 2eeb086f70 H265: Support RPS prediction in h265 SPS
According to Rec. ITU-T H.265 7.3.7 and 7.4.8,
when there are multiple RPS in SPS,
RPS can be predicted from previous ones.

But NumDletaPocs used to be a local variable for each RPS,
prediction will always fail.
In this change, NumDletaPocs is  moved from dissect_h265_st_ref_pic_set
to dissect_h265_seq_parameter_set_rbsp, to allow access to previous RPS
data.

This change also move each RPS into a subtree.

Fix #18481
2022-10-16 21:24:06 +00:00
Gerald Combs 44a17f395f [Automatic update for 2022-10-16]
Update manuf, services enterprise numbers, translations, and other items.
2022-10-16 21:08:54 +00:00
Martin Gallo fc052615a6 SAPNI: Added SAP NI as main dissector 2022-10-16 19:59:59 +00:00
Guy Harris f86a0d5ab4 Use wmem_strbuf_append_unichar_repl() to append a REPLACEMENT CHARACTER.
Replace several instances in which a REPLACEMENT CHARACTER was being
appended to a wmem_strbuf with a call to
wmem_strbuf_append_unichar_repl().

This reduces the number of explicit 0x00fffd or 0xfffd or... in the
code.
2022-10-15 14:16:10 -07:00
João Valverde ab7b71605c TDS: Reject invalid ASCII
Fixes #18448.
2022-10-15 20:17:56 +00:00
John Thacker cb23c5e8d7 PER, asn2wrs: Fix permitted-alphabet constrained character strings
Effective permitted-alphabet constraints are only PER-visible for
the known-multiplier character string types (X.691 27.1). When
PER-visible, the upper bound of any code point used in the
alphabet needs to be calculated, in particular for the ALIGNED
variant, because that determines whether or not canonical order
is used (X.691 27.5.2, 27.5.4).

Note that even with the change to asn2wrs.py none of the generated
dissectors change, because we don't have any example of ASN.1
with non-PER visible permitted alphabet constraints because of
using them on non known-multiplier character string types
(like UTF8String).

There's some various edge cases that we still don't handle, but
nothing that any of the ASN.1 modules in the repository use.
(Permitted-alphabet constraints using characters outside the
ASCII range, possibly with "CharacterStringList", "Quadruple",
or "Tuple" notation, permitted-alphabet constraints that are
extensible and thus not PER-visible, etc.)

Also fix a fencepost error with the length of the octets to highlight.

Fix #18468
2022-10-15 17:20:02 +00:00
Martin Mathieson 21b3529be4 ANSI-A: init user_data field in stat_tap_table_item_type entries. 2022-10-15 17:17:11 +00:00
Michael Tuexen 510c22a6a7 TCP: Update TCP TARR support to version 06 of the ID
The dissector now supports draft-gomez-tcpm-ack-rate-request-06.
The rate is now encoded in one byte instead of two.
2022-10-15 15:59:35 +02:00
Brian Sipos 89a63469f9 LTP: Guard itree use when segments have invalid data ranges
This also guards a coverty issue in ltp_stats_tree_packet()
2022-10-15 12:48:49 +00:00
João Valverde c045c70f00 JSON: Clean up stripping of double quotes in members 2022-10-15 12:10:19 +01:00
João Valverde 2d5bc550c8 JSON: Fix validation of UTF-8
Instead of trying to rewrite the validation of UTF-8 for the nth
time first extract a validated string from the parser with
tvb_get_string_enc() and then do the post-processing on that
(unescape, etc.).
2022-10-15 12:10:19 +01:00
João Valverde 995096df70 JSON: Add preference to enable "unescaping" strings 2022-10-15 12:10:19 +01:00
João Valverde d2a488f5d5 wslog: Do not print control characters 2022-10-15 11:08:53 +01:00
João Valverde d4ba8be9d7 Github CI: Rename MSYS2 job 2022-10-14 20:25:07 +00:00
João Valverde a72edfff49 XML: Sanitize UTF-8 input
Fixes #18471.
2022-10-14 21:06:31 +01:00
João Valverde 75eb708143 RTSP: Use format_text() on a string
Fixes #18474.
2022-10-14 18:23:30 +00:00
Richard Sharpe b02fc55253 ieee80211: Correct the number of bits for phi & psi in beamforming matrices
I noticed while implementing the equivalent for 802.11be that the number
of bits for phi and psi angles was reversed. Also, fixed the spelling of
AvgSNR.
2022-10-14 17:44:33 +00:00
Chuck Craft d0ce6e5f81 Github: Ignore symbol changes on the master branch
See #18404 and !8452
2022-10-14 10:31:15 -05:00
João Valverde 3de62e588f wsutil: Rewrite ws_utf8_char_len() using a lookup table
Rewrite for speed and correctness.

This implementation is more strict with invalid
first bytes (continuation bytes, invalid codepoints and
some overlong sequences).

Returns 0 instead of -1 for invalid bytes.
2022-10-14 12:19:11 +01:00
João Valverde eea68c7721 WBXML: Replace tvb_get_const_stringz()
Ping #18447.
2022-10-14 11:04:48 +01:00
João Valverde 8ca0aa78ed SMB Pipe: Replace tvb_get_const_stringz()
Ping #18447.
2022-10-14 11:03:58 +01:00
João Valverde ceca3fed61 DCT2000: Replace tvb_get_const_stringz()
Ping #18447.
2022-10-14 11:00:46 +01:00
Guy Harris 8cca807485 WSDG: tell users not to go for "Qt 6.4 for desktop development".
That will 1) install 6.4, which isn't the recommended LTS version and 2)
install headers and libraries for MinGW-w64, not for Visual Studio.
That means that if you're trying to build with Visual Studio, things
won't work.
2022-10-13 22:40:01 -07:00
John Thacker 790f9eeaa9 PER: Ensure that restricted strings are UTF-8
Use UTF-8 replacement characters for characters outside the
restricted string domain. This is particularly important to
guarantee valid UTF-8 for values outside the ASCII range.

Fix #18423
2022-10-13 21:27:02 -04:00
John Thacker 325506919b epan: Use ws_utf8_truncate for formatted expert infos
Use the convenience function created in 01e2b16ec6
2022-10-13 18:22:44 -04:00
Gerald Combs f10538a102 falcodump: Fix our credential and config file parsing. 2022-10-13 16:32:43 +00:00
Tim Potter b484c41811 wimaxasncp: Fix dissection of message type in packet header
It looks like there was a cut&paste error a long time ago resulting
in the wimaxasncp.message_type field being incorrectly detected as
unused and commented out. Closes #18424.
2022-10-13 14:51:03 +00:00
Dr. Lars Völker 89a3c8679c BLF: Fixing the interpretation of SRR and RTR
This fixes a bug in the canfdmessage64 encoding in BLF that leads to
CAN-FD frames being interpreted as Remote Frames instead of correctly
ignoring the SRR flag. Makes canfdmessage encoding more robust as well.
2022-10-13 14:48:43 +00:00
Dr. Lars Völker 883bc6ef29 TECMP: improve FCS and Padding detection for Ethernet
This patch fixes some bugs that occur with padded Ethernet frames
or Ethernet frames with FCS present.
2022-10-13 14:47:12 +00:00
John Thacker 9891a79137 nbt: Check NetBIOS scope IDs
RFC 1001 says that scope IDs "meet the restricted character set
of the domain system and has a leading period." Convert them from
ASCII (plus possible garbage fuzzed characters) to UTF-8. Also
check for truncation when appending them to the NetBIOS name.

Fix #18412
2022-10-13 12:04:16 +00:00
Michael Tuexen 41fdfcdbfb SCTP: Improve handling of Host Name parameters 2022-10-13 10:14:00 +00:00
Patricia Lindner ceed050c47 LTP: Enhance with generated items, sequence analysis, and statistics
This change adds computed values for reports, sequence analysis between
segments, conversation and endpoint taps, and a new statistics menu
and dialog.
2022-10-13 09:30:55 +00:00
João Valverde 101ad8f29e Github CI: Add MSYS2 build
Ping #17771.
2022-10-13 08:08:11 +00:00
João Valverde c01545ef7c msys2-setup.sh: Add missing git package 2022-10-13 08:08:11 +00:00
John Thacker 900984b3b7 smb: Fix display_unicode_string
In SMB, display_unicode_string is used to handle null terminated
UTF-16LE strings. Do that with the normal API, instead of just
taking every other byte (which works for ASCII and nothing else.)

Do the same fix for the DirectPlay dissector, which borrowed the
code from SMB

Fix #18467.
2022-10-12 23:52:03 -04:00
John Thacker 01e2b16ec6 wsutil/str_util: Add ws_utf8_truncate
Add a convenience function to truncate a UTF-8 string to no more
than certain length, while ensuring that the string ends with
a complete character instead of a partial sequence (by truncating
up to 3 additional bytes as necessary.)

The common use case is when a valid UTF-8 string is copied into
a buffer via snprintf, strlcpy, or strlcat and truncated, to fix
up the end of the string and keep the string valid.

The buffer holding the string must be large enough, and the string
must be valid up to the point of truncation (aside from the possible
partial sequence at the end). For speed, the function does not check
those conditions.

Ping #18412.
2022-10-12 23:21:18 -04:00
John Thacker 87441e45d8 Qt: minizip and minizip-ng size compatibility issues
MS-DOS Date and MS-DOS Time are packed 16-bit values
(https://learn.microsoft.com/en-us/windows/win32/sysinfo/ms-dos-date-and-time)
and when combined they make a 32-bit value.

In the original minizip that comes with zlib, the combined dosDate
parameter is a uLong, which is 64 bits on LP64 platforms. In minizip-ng,
it is a uint32_t.

At one point, minizip-ng renamed the dosDate struct member of
zip_fileinfo to dos_date, but more recent versions changed it back
to dosDate for compatibility, except the size remains different,
so our compatibility check can't distinguish the size.

clang (and possibly other compilers) complain about shortening a 64 bit
unsigned long to a uint32_t so make the return value from our
qDateToDosDate a uint32_t as it should be to avoid warnings on
distributions with minizip-ng

Also the maximum year value that can be stored in the format is
127, since it occupies bits 9-15 of the MS-DOS Date. (There was
probably some confusion since the maximum year is 2107, but its
offset from 1980, not 1900.)
2022-10-12 22:03:34 -04:00
Chuck Craft 3c0936d83e Github actions: newer verions with node12 -> node16
Ping #18462
2022-10-12 20:32:37 +00:00
João Valverde d99426fa6a GVCP: Replace tvb_get_const_stringz()
Ping #18447.
2022-10-12 17:35:30 +01:00
João Valverde 9a16cda9c7 HICP: Replace tvb_get_const_stringz()
Ping #18447.
2022-10-12 17:33:34 +01:00
João Valverde a0a2386f74 LISP: Replace tvb_get_const_stringz()
Ping #18447.
2022-10-12 10:58:22 +01:00
João Valverde 803edf3f72 Homeplug AV: Replace tvb_get_const_stringz()
Ping #18447.
2022-10-12 10:55:41 +01:00
João Valverde 8ad9561f22 Open Sound Control: Replace tvb_get_const_stringz()
Ping #18447.
2022-10-12 09:25:23 +00:00
João Valverde a05b210e11 F5 Ethtrailer: Replace tvb_get_const_stringz()
Ping #18447.
2022-10-12 09:25:23 +00:00
João Valverde 411289eaca IEEE 17221: Replace tvb_get_const_stringz()
Ping #18447.
2022-10-12 09:25:23 +00:00
João Valverde af36a6ffcc ELF: Replace tvb_get_const_stringz()
Ping #18447.
2022-10-12 09:25:23 +00:00
Guy Harris 670bacedc9 Match declaration style of other functions.
All other functions are declared with two lines:

    WS_DLL_PUBLIC <type>
    <function_name(<args>);

Declare wtap_block_foreach_option() that  way, too, for consistency.
2022-10-12 01:25:04 -07:00
Guy Harris f7422a5cc8 Use "a" before consonant sounds, use "an" before vowel sounds. 2022-10-11 23:53:03 -07:00
Guy Harris 4653583e1e Separate cases with spaces.
All other cases in that switch statement have spaces between them; add
one before this one.
2022-10-11 22:41:18 -07:00