Commit Graph

85617 Commits

Author SHA1 Message Date
Martin Mathieson 0b83d51e75 E2AP: Add a comment for constant value taken from later spec 2022-10-28 10:41:06 +01:00
Guy Harris 083b07d88d Fix profile import/export menu items.
1) In English-language menus, menu item text should use title case, with
most words capitalized.  (I leave it to the Transifexors to capitalize
appropriately for other languages.)

2) Menu items that pop up dialogs should have "..." at the end of the
text.
2022-10-28 01:13:43 -07:00
Guy Harris 86af1d6707 e2ap: fix a compiler warning due to a strange maxofRICrequestID value.
The minimum and maximum length arguments to
dissect_per_constrained_set_of() are currently both ints.

According to O-RAN.WG3.E2AP-v02.03, section 9.3.7 "Constant
definitions", maxofRICrequestID is 1024, not 2^32-1; however, we were
specifying it as 2^32-1 (4294967295).

2^32-1 won't fit into an int, and Apple clang version 14.0.0
(clang-1400.0.29.102) warns about that:

    ./asn1/e2ap/e2ap.cnf:647:54: error: implicit conversion from 'long' to 'int' changes value from 4294967295 to -1 [-Werror,-Wconstant-conversion]
                                                      1, maxofRICrequestID, FALSE);
                                                         ^~~~~~~~~~~~~~~~~
    ./asn1/e2ap/packet-e2ap-val.h:7:40: note: expanded from macro 'maxofRICrequestID'
    #define maxofRICrequestID              4294967295
                                           ^~~~~~~~~~

The handling of MIN and MAX should be done with separate "minimum is
MIN" and "maximum is MAX" flags, and we might want either to have
asn2wrs.py reject attempts to have constraints with integer minimum and
maximum values outside the range [-2^31, 2^31-1], make the types for
sizes unsigned, or allow 64-bit constraints (and still limit the
constraint values, so we don't have to dive down a bignum rathole).

But, for now, we just change maxofRICrequestID to match what the 2022-10
version of the spec, 2.03, appears to say.

(I can't find the 2.01 version online, so I don't know whether it was
1024 in 2.01, or if it was changed in 2.02 or 2.03.)
2022-10-27 23:57:51 -07:00
John Thacker 4c3ebe73d3 epan: ensure that the result of ws_label_strcpy is terminated
Unless there is no available space, ensure that the label_str
passed into ws_label_strcpy is null terminated, in the cases
where the string to copy is the empty string, or begins with
invalid UTF-8.

Fix #18560. Fix #18551.
2022-10-27 18:37:17 -04:00
Martin Mathieson d46e7f90f2 E2AP 2.01 2022-10-27 20:26:11 +00:00
Martin Mathieson c8cf2f544c PER: Fix length of restricted character string item 2022-10-27 19:13:48 +00:00
Gerald Combs d560dd3948 Qt: Fix our default font size on Windows.
It looks like we need to adjust our monospace font size differently in
Qt6 on Windows.
2022-10-27 10:29:47 -07:00
João Valverde 4d2680cf75 DNS: Fix column info encoding errors
Return name from get_dns_name() is not UTF-8 and cannot be used
directly. Use "name_out" instead.

Fixes #18557.
2022-10-27 09:25:25 +00:00
João Valverde 89fe7720f3 PKTC: Fix timestamp encoding errors 2022-10-27 09:03:58 +00:00
João Valverde 6b468cbae7 VTP: Fix timestamp encoding errors
Fixes #18526.
2022-10-27 09:03:58 +00:00
João Valverde 00ac65ff83 AMQP: Fix char encoding errors
Fixes #18522.
2022-10-27 09:46:41 +01:00
James Ko f1ddda51d4 wisun: Rename field name with common abbreviations
Rename some HF field names [FIELDNAME] with common abbreviations and
add move Full name to blurb [FIELDDESCR].
2022-10-26 19:35:11 +00:00
James Ko e2c9021111 ieee802154-tap: Add PHY Header TLV
Sniffers may provide a PHR via the PHY Header TLV.
Dissects SUN FSK PHR with and without Mode Switch, and
Wi-SUN FSK Mode Switch PHR.
2022-10-26 19:35:11 +00:00
João Valverde 76a6e2a2bf ftypes: Do not sanitize strings for UTF-8 errors
The ftype itself is encoding agnostic. In the case of literal
display filter strings it is possible and legal to contain
invalid UTF-8.

Maybe it shouldn't be but that requires a user-friendly diagnostic
message, not silently sanitizing the string as is done currently
(only a debug message is printed in that case).

Do the debug checks in proto_tree_set_string() instead. That
still detects dissector code that might need fixing, which was
the purpose for this check.

Improve documentation and add admonition for proto_tree_add_string().

Ping #18521.
2022-10-26 16:23:55 +01:00
João Valverde c1cede8d7c epan: Format column string input for display.
Format the input for display, by escaping some non printable characters,
using ws_label_strcpy().

In some cases with vsnprintf() this requires using a temporary buffer.

Add some debug checks for invalid UTF-8 errors.

The intention here is to pass dissection data directly to the column
API, and the column functions are responsible for formatting that
data for display. This avoids having to call format_text() before
adding a string to a column and separates the concerns better.
Display formatting is an UI concern.
2022-10-26 13:28:19 +01:00
João Valverde 92e1357bb4 Rename ws_label_strcat() to ws_label_strcpy()
The semantics of ws_label_strcat() are closer to g_strlcpy() so
rename the function to reflect that.
2022-10-26 13:12:35 +01:00
João Valverde f55cb116a0 Remove memset() from ws_label_str()
In the interests of efficiency with multiple small writes avoid
doing a memset on the whole remaining length.
2022-10-26 13:12:31 +01:00
João Valverde c149e4112f epan: Rename a test 2022-10-26 13:12:12 +01:00
João Valverde 8920effd27 FiveCo Legacy: Fix raw bytes as UTF-8 2022-10-26 11:58:15 +01:00
João Valverde 62d6fb85c7 Netrom: Fix string truncation
Fixes #18532.
2022-10-26 11:57:09 +01:00
João Valverde 0157d74c44 epan: Fix bogus string truncations found with a search
Fix some unnecessary string truncations that look bogus to me.

Forcing a given UTF-8 byte length for no reason will in most cases
produce encoding errors.

Fixes #18548.
2022-10-26 11:14:06 +01:00
João Valverde 40ec1adfb0 S7Comm: Fix invalid UTF-8 value string chars
Fixes #18533.
2022-10-26 01:42:43 +01:00
João Valverde 56ee77d525 DNS: Do not truncate string arbitrarily
Truncating the decoded string to the encoded packet length is
the wrong thing to do.

Fixes #18535.
2022-10-26 00:37:37 +00:00
João Valverde 549e194e7c MPEG2 Descriptors: Validate ASCII strings
Fixes #18536.
2022-10-26 00:37:05 +00:00
John Thacker 5a144e6010 synergy: Format unknown packet types as UTF-8
Also fix an issue where the wrong bytes were being looked at
to determine if it was a handshak.

Fix #18528
2022-10-25 19:42:46 -04:00
Gerald Combs 23f206c8b8 GitLab CI: Build RPMs in parallel.
Our RPM spec runs `cmake --build ... -j1` on Fedora and Rocky. Set
RPM_BUILD_NCPUS, which increases the `-j` value so that ninja can make
full use of the system.

[skip ci]
2022-10-25 19:35:43 +00:00
Gtker 3a19d97867 woww: Make enums use biggest size occurrance 2022-10-25 19:08:09 +00:00
Gtker 71e989a0f4 woww: Make types have the FT of their largest type instead of smallest 2022-10-25 19:08:09 +00:00
Gtker da8a0e64f3 woww: Remove _guid from some HFs 2022-10-25 19:08:09 +00:00
Gtker f88027a1ef woww: Remove _guid from item and player in SMSG_ITEM_NAME_QUERY_RESPONSE 2022-10-25 19:08:09 +00:00
Gtker b2ee0f32d1 woww: Add underscore to buy_bank_slot_result 2022-10-25 19:08:09 +00:00
Gtker c77b972edc woww: Make SMSG_TURN_IN_PETITION_RESULTS use petition_results 2022-10-25 19:08:09 +00:00
Gtker bc433b41ce woww: Remove incorrect field from SMSG_PETITION_SHOWLIST 2022-10-25 19:08:09 +00:00
Gtker 302117823b woww: Update SMSG_PETITION_SIGN_RESULTS 2022-10-25 19:08:09 +00:00
Gtker ba1edd97e8 woww: Add SMSG_GUILD_ROSTER 2022-10-25 19:08:09 +00:00
Gtker 8e3d587421 woww: Remove skip fields and add gm_ticket_queue_status 2022-10-25 19:08:09 +00:00
Gtker 226ee2e242 woww: Add change NECK_OR_RELIC to RELIC and fix SPLINE_FLAG_UNKNOWN31
For 1.12 0x02 is just NECK and RELIC is 0x1C.
2022-10-25 19:08:09 +00:00
Gtker d6e47936a4 woww: Fix warnings about values being out of scope for int 2022-10-25 19:08:09 +00:00
Gtker 478fddaec4 woww: Split GM_TICKET_STATUS enumerators with underscores 2022-10-25 19:08:09 +00:00
Gtker c9f1d411a4 woww: Add gm_ticket_type to CMSG_GMTICKET_UPDATETEXT 2022-10-25 19:08:09 +00:00
Gtker c3630bc0e9 woww: Remove compressed field from CMSG_GMTICKET_CREATE 2022-10-25 19:08:09 +00:00
Gtker 25403e9f15 woww: Add comment field to CMSG_GMSURVEY_SUBMIT 2022-10-25 19:08:09 +00:00
Gtker 1996a520ec woww: Remove compressed CMSG_AUTH_SESSION field 2022-10-25 19:08:09 +00:00
Gtker 24b4c703c4 woww: Add battleground related updates 2022-10-25 19:08:09 +00:00
Gtker aa1ff9f57d woww: Update incorrect messages 2022-10-25 19:08:09 +00:00
Gtker ec659dc177 woww: Add more fields for SMSG_ATTACKERSTATEUPDATE 2022-10-25 19:08:09 +00:00
Gtker e561372278 woww: Update SMSG_ADDON_INFO, fix endless array looping
The arrays would previously loop for the amount of bytes left, not the
amount of objects left.
2022-10-25 19:08:09 +00:00
Gtker 53fa582c92 woww: Rename compressed_addon_info to addon_info 2022-10-25 19:08:09 +00:00
Gtker 75b312c659 woww: Make message direction detection be more flexible 2022-10-25 19:08:09 +00:00
Gtker 7f46c9fc56 woww: Register with decode_as instead of _with_preference
Feedback in PR
https://gitlab.com/wireshark/wireshark/-/merge_requests/8356#note_1121741591
2022-10-25 19:08:09 +00:00