seladb / PcapPlusPlus

PcapPlusPlus is a multiplatform C++ library for capturing, parsing and crafting of network packets. It is designed to be efficient, powerful and easy to use. It provides C++ wrappers for the most popular packet processing engines such as libpcap, Npcap, WinPcap, DPDK, AF_XDP and PF_RING.
https://pcapplusplus.github.io/
The Unlicense
2.68k stars 650 forks source link

Fix crash with parseuntil when top layer is more than the chosen parseuntil OSI layer. #1580

Open rndx21033 opened 1 week ago

rndx21033 commented 1 week ago

Fix crash with pcpp::Packet parseuntil of OSI layer that is less than the top layer in the packet.

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 82.90%. Comparing base (4af4b8b) to head (e2f03a3).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #1580 +/- ## ========================================== - Coverage 82.91% 82.90% -0.01% ========================================== Files 273 273 Lines 46261 46274 +13 Branches 9412 9343 -69 ========================================== + Hits 38356 38365 +9 - Misses 7049 7105 +56 + Partials 856 804 -52 ``` | [Flag](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1580/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [fedora39](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `74.51% <100.00%> (+<0.01%)` | :arrow_up: | | [macos-12](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `80.89% <100.00%> (+<0.01%)` | :arrow_up: | | [macos-13](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `80.31% <100.00%> (+<0.01%)` | :arrow_up: | | [macos-14](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `80.23% <100.00%> (+<0.01%)` | :arrow_up: | | [mingw32](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `70.28% <100.00%> (-0.03%)` | :arrow_down: | | [mingw64](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `70.25% <100.00%> (-0.05%)` | :arrow_down: | | [npcap](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `84.82% <100.00%> (-0.03%)` | :arrow_down: | | [rhel94](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `74.29% <100.00%> (+<0.01%)` | :arrow_up: | | [ubuntu2004](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `57.84% <100.00%> (-0.01%)` | :arrow_down: | | [ubuntu2004-zstd](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `57.96% <100.00%> (-0.03%)` | :arrow_down: | | [ubuntu2204](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `74.19% <100.00%> (-0.03%)` | :arrow_down: | | [ubuntu2204-icpx](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `58.40% <80.00%> (-0.03%)` | :arrow_down: | | [ubuntu2404](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `74.45% <100.00%> (-0.03%)` | :arrow_down: | | [unittest](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `82.90% <100.00%> (-0.01%)` | :arrow_down: | | [windows-2019](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `84.87% <100.00%> (-0.01%)` | :arrow_down: | | [windows-2022](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `84.87% <100.00%> (-0.02%)` | :arrow_down: | | [winpcap](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `84.85% <100.00%> (+<0.01%)` | :arrow_up: | | [xdp](https://app.codecov.io/gh/seladb/PcapPlusPlus/pull/1580/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `49.21% <100.00%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.