Commit Graph

85818 Commits

Author SHA1 Message Date
John Thacker 09914cca33 S1AP: Use bitmask for cellIdentity
Instead of using tvb_get_bits32 and proto_tree_add_uint,
use a bitmask in the field info and proto_tree_add_item.

This means that when epan/print.c writes PDML or JSON,
the value written is the correctly masked value (PDML also
includes the unmasked value.)

When proto_tree_add_uint is used, the value written to
PDML and JSON is the original value from the packet buffer,
not properly shifted.
2022-11-20 12:56:08 +00:00
John Thacker 92208e4330 HTTP2: Ensure that the unescaped header value is valid encoding
It's possible, in the case of errors, for the result of
g_uri_unescape_string not to be valid UTF-8, either if originally
some other encoding was percent-encoded, or if there were errors.
Check for it.

Fix #18658.
2022-11-20 11:44:39 +00:00
João Valverde 79c3a77752 Add macros to control lemon diagnostics
Rename flex macros using parenthesis (mostly a style issue):

DIAG_OFF_FLEX -> DIAG_OFF_FLEX()
DIAG_ON_FLEX  -> DIAG_ON_FLEX()

Use the same kind of construct with lemon generated code using
DIAG_OFF_LEMON() and DIAG_ON_LEMON(). Use %include and %code
directives to enforce the desired order with generated code
in the middle in between pragmas.

Fix a clang-specific pragma to use DIAG_OFF_CLANG().

DIAG_OFF(unreachable-code) -> DIAG_OFF_CLANG(unreachable-code).

Apparently GCC is ignoring the -Wunreachable flag, that's why
it did not trigger an unknown pragma warning. From [1}:

  The -Wunreachable-code has been removed, because it was unstable: it
  relied on the optimizer, and so different versions of gcc would warn
  about different code.  The compiler still accepts and ignores the
  command line option so that existing Makefiles are not broken.  In some
  future release the option will be removed entirely. - Ian

[1] https://gcc.gnu.org/legacy-ml/gcc-help/2011-05/msg00360.html
2022-11-20 10:11:27 +00:00
João Valverde c4ca4312c1 CMake: Add -Werror to sharkd 2022-11-19 23:12:19 +00:00
Chuck Craft 80ebd68cc4 github: windows - downgrade cmake back to 3.24.3
cmake 3.25 changed library search logic for .a and .library
Downgrade cmake until libsmi and zlib cmake files are adjusted?
See notes in !8807
2022-11-18 21:02:44 -06:00
João Valverde f3a96bc18c IAX2: Fix UTF-8 string encoding
Fixes #18651.
2022-11-18 11:32:13 +00:00
John Thacker 8037ecf93f mip6: Use ENC_APN_STR 2022-11-18 10:59:19 +00:00
João Valverde 45c15019ac AT: Fix UTF-8 string encoding
Fixes #18650.
2022-11-18 10:11:00 +00:00
João Valverde 6bc87f01da T.30: Fix UTF-8 encoding
Fixes #18649.
2022-11-18 10:10:07 +00:00
Martin Mathieson 709d65883f Fix some cppcheck issues 2022-11-18 10:07:57 +00:00
John Thacker d7ae26bf6c CMake: Update minimum required version to 3.13
Windows already requires CMake 3.13. Bump the non-Windows
required version to 3.13 as well, since all our currently
supported Linux distributions have at least 3.13.

RHEL 8 and SUSE Enterprise 15 were initially released with
3.10 and 3.11, but have had updates with much more recent
versions since mid 2021 and mid 2020, respectively.
2022-11-18 10:05:25 +00:00
João Valverde 18b161c80f CMake: Split "extra" warnings into interesting/not interesting
Add another category for warnings that are worth looking
into.

Split ENABLE_EXTRA_WARNINGS into ENABLE_TODO_WARNINGS and
ENABLE_PEDANTIC_WARNINGS.

Disable pedantic warnings in the CI builds.

Add Clang specific warnings to standard category.

Fix or workaround -Wunreachable warnings.
2022-11-18 10:04:50 +00:00
João Valverde 64f4a441d1 Release notes: Remove an entry
Delete entry that is no longer accurate. The removal was backported and released
with 4.0.1.
2022-11-17 21:38:28 +00:00
João Valverde 90fb3ff438 Disable a compiler warning for Flex generated code
The flex+clang combination in the macOS Intel builder generates
-Wdocumentation warnings. Silence those warnings.
2022-11-17 17:36:32 +00:00
Alexis La Goutte 8aa55eb2ba etwudmp: fix typo
parmeters => parameters
2022-11-17 14:53:02 +00:00
John Thacker 45cc56746b aol: Token encoding
The token is a 2 character ASCII string. Treat it as such.

Fix #18616.
2022-11-17 14:22:05 +00:00
João Valverde 3903740534 Try to fix more -Wdocumentation-html warnings
/Users/buildslave/builds/UfJL1hoT/0/wireshark/wireshark/ui/qt/widgets/qcustomplot.cpp:16020:17: error: HTML tag 'tt' requires an end tag [-Werror,-Wdocumentation-html]
  parameter as <tt>QVariant(\ref QCPDataSelection)</tt>. All plottables that weren't touched by \a
               ~^~~
1 error generated.
2022-11-17 13:34:21 +00:00
João Valverde dbb5b80344 CMake: Comment out some warning exceptions 2022-11-17 13:30:33 +00:00
Ferry Huberts 7a29f10d6d locamation-im: restore showing the eol character in the hex dump
This got lost in b00725c945.

Showing the eol character is important to us.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
2022-11-17 12:35:23 +00:00
Ferry Huberts 16107683c6 locamation-im: line numbers are never used for split lines, lose them
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
2022-11-17 12:35:23 +00:00
João Valverde 6d2aea45e4 Try to fix an -Wdocumentation-html warnings
Warning triggered using AppleClang 11.0.0.
2022-11-17 12:34:42 +00:00
João Valverde 006f10f108 Gitlab CI: Enable -Werror with Clang builds
Enable -Werror so Clang specific warnings will trigger a build
error and can't be checked-in.

This requires disabling "extra" warnings.

Add explicit ENABLE_WERROR=ON options instead of relying on defaults.
2022-11-17 11:31:30 +00:00
João Valverde e1d492e2e0 CMake: Do not disable -Werror with "extra compiler warnings"
Give the ENABLE_WERROR option full control of -Werror. Silently
overriding the user configuration is potentially confusing and
unnecessary.
2022-11-17 11:22:57 +00:00
João Valverde 2443df7318 Disable another -Wunreachable lemon warning 2022-11-17 11:21:41 +00:00
João Valverde 973748f321 CMake: Cleanup some compiler flags
Enable -Qunused-arguments because it may be a useful warning.
Remove -fwrapv because it is implied by -fno-strict-overflow.

Move GCC-specific flag out of if(GCC) condition. Let CMake enable
it automatically.
2022-11-17 11:20:57 +00:00
João Valverde 5754fdf289 tfshark: Enable -Werror and fix compiler warnings
Fix a -Wunreachable warning.
2022-11-17 10:57:52 +00:00
João Valverde cfbe898dcc CMake: Disable -Werror for flex generated files 2022-11-17 10:23:12 +00:00
Martin Mathieson 7efa4cb9a4 ORAN FH CUS: More changes to line up samples properly for Mod Compr 2022-11-17 09:33:42 +00:00
John Thacker b00725c945 locamation-im: Fix encoding
Add strings with proto_tree_add_item or tvb_get_string_enc;
avoid using tvb_get_raw_bytes_as_string.

Use UTF-8 as the encoding to future-proof, according to
Locomation.

Use tvb_find_line_end() to split the lines, which does almost
all the needed logic and simplifies the code.

Fix #18632
2022-11-17 03:04:48 +00:00
João Valverde 4c4b3ec3a9 CMake: Move -Wlogical-op to common flags
It's is valid for C and C++ so move -Wlogical-op to common
flags.

Remove comment because GCC 4.4.5 is over 12 years old at this time,
assume it is outdated.
2022-11-17 01:35:16 +00:00
João Valverde 09718fb9b3 CMake: Move clang warnings
Move clang warnings to normal set. Let the CMake compatibility
check control the warning.

Fix or work-around -Wunreachable warnings in the code.
2022-11-17 01:35:16 +00:00
João Valverde 671bb9f190 CMake: Remove warnings enabled by default
Remove warnings included in -Wall and -Wextra to make the command
line less noisy and speed up CMake invocation.

Remove a -Werror=implicit flag. Let errors be controlled exclusively
by -Werror.

Move some -Wno-foo flags that are only relevant with -Wpedantic.
2022-11-17 01:35:16 +00:00
João Valverde 7ce4b153ae X509IF: Fix null pointer dereferencing.
Fixes #18652.
2022-11-17 01:09:07 +00:00
João Valverde c37bb02484 Regenerate ASN.1 dissectors 2022-11-17 01:08:47 +00:00
John Thacker 6e6386a3dc rpm-setup: Don't attempt to install cmake3
cmake is already in the basic list of packages. "cmake3" is
necessary for RHEL/CentOS 7 (where the "cmake" package is 2.8.12),
but that distribution isn't supported on 4.0 and later.

At the same time, the OpenSUSE 15.4 repository accidentally has
a "cmake3" package which is an earlier version than the "cmake" RPM,
which creates some conflicts when trying to install both.
(https://gitlab.com/wireshark/wireshark-containers/-/jobs/3328997023)

So, don't attempt to install cmake3 anymore.
2022-11-16 18:51:42 -05:00
Dario Lombardo baaf60cb34
ptp: prevent divide by zero.
Check for valid values before use.

Fix: #18635.
2022-11-16 22:25:42 +01:00
João Valverde fc28bb0502 X509IF: Remove another fixed length buffer 2022-11-16 20:27:35 +00:00
João Valverde 59ee5247dc X509IF: Fix string truncation
Use a wmem_strbuf_t to avoid a truncation in the middle of a
multibyte character with a fixed length buffer.

Fixes #18543.
2022-11-16 20:27:35 +00:00
Gerald Combs b2d3f8dc31 GitLab CI: Update our schedule rules.
Note that we have a "weekly" schedule and add an unused weekly rule
stanza.
2022-11-16 17:15:30 +00:00
John Thacker 8fd375cfad tcp: Use correct wraparound comparison in sequence analysis
maxseqtobeacked needs to be increased when it's lower than
nextseq, not the other way around, otherwise we can get repeated
extra TCP ACKed unseen segment messages.

Since sequence analysis is always on the absolute sequence
numbers, not relative, it needs to use LT_SEQ to handle wraparound.

Fix #18558. Fix #18633.
2022-11-16 12:58:27 +00:00
Martin Mathieson 9b644f7f84 ORAN FH CUS: Start on Modulation Compression Support 2022-11-16 09:58:08 +00:00
John Thacker 5362cc9b3e Fix build on OpenSUSE 15.3
On older Qt versions (5.12?) QVector needs to be included,
not just QObject. (It isn't needed on 5.15, possibly because
QVector is an alias for QList in newer Qt versions.)
2022-11-16 08:21:13 +00:00
David Perry 714ee652cd Refactor PCEP object dissection for readability 2022-11-16 08:20:40 +00:00
AndersBroman 1e5f909617 RTPProxy: Remove newlines from col info. 2022-11-16 08:15:39 +00:00
John Thacker 5396eeb578 reassemble: More fragment_seq_single issues.
Fix #18644 and Coverity CID 1516901. The add_seq_single code
really treated fragment heads and fragment items interchangeably
in several places.
2022-11-15 20:42:55 -05:00
John Thacker 03a4eed570 ppp: Check to see if process_reassembled_data gave us a tvbuffer
It's possible to have multiplexed PPP MP that occurs in several
layers in the same frame, so we need to check that we're in the
right packet and also the right layer. process_reassembled_data
does that, so check to see if it returned a tvb instead of
just checking the frame number. Prevents some DISSECTOR BUG errors
when the buffer isn't actually available.
2022-11-16 01:18:14 +00:00
John Thacker 1a04473ca8 opcua: Quiet a Coverity warning
It really shouldn't be possible to have a fragment head with
no fragment items here, but quiet Coverity CID 1516904 here.
2022-11-15 17:08:53 -05:00
David Perry 99d3112464 Show the address space of IPv6 addresses 2022-11-15 16:38:30 +00:00
Pascal Quantin 6b41ad918b PCAP: upgrade dissector to v17.0.0
In their infinite wisdom, 3GPP succeeded to make non backward compatible
ASN.1 description
Closes #18646
2022-11-15 16:04:54 +01:00
Pau Espin 37a0ccee9c GSM A-bis/OML: Show NACK cause descriptions 2022-11-15 10:23:47 +00:00