Skip to content

Commit 26ced48

Browse files
authored
Bump to Alpine 3.20, Fedora 40, FreeBSD 13.4 and 14.1 (#1588)
* Bump to Alpine 3.20 * Bump to Fedora 40 * ci: bump FreeBSD to 13.4 and 14.1 * pcap++: pcaplivedevice avoid variable-length arrays
1 parent 20974e6 commit 26ced48

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

.github/workflows/build_and_test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ jobs:
7272
config-zstd: OFF
7373
- image: ubuntu2004-zstd
7474
config-zstd: ON
75-
- image: fedora39
75+
- image: fedora40
7676
config-zstd: OFF
77-
- image: alpine317
77+
- image: alpine320
7878
config-zstd: OFF
7979

8080
steps:
@@ -585,12 +585,12 @@ jobs:
585585
runs-on: ubuntu-latest
586586
strategy:
587587
matrix:
588-
version: ["14.0", "13.2"]
588+
version: ["14.1", "13.4"]
589589
steps:
590590
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
591591
- name: Test in FreeBSD
592592
id: test
593-
uses: vmactions/freebsd-vm@12c207ac1ba13827f25726fe93f9c2e6f685f0f3 # v1.0.8
593+
uses: vmactions/freebsd-vm@d7b8fcc7711aa41ad45e8d9b737cf90f035a7e3d # v1.1.3
594594
with:
595595
release: ${{ matrix.version }}
596596
usesh: true

.github/workflows/package.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ jobs:
3939
config-zstd: OFF
4040
- image: rhel94
4141
config-zstd: OFF
42-
- image: fedora39
42+
- image: fedora40
4343
config-zstd: OFF
44-
- image: alpine317
44+
- image: alpine320
4545
config-zstd: OFF
4646

4747
steps:
@@ -93,17 +93,16 @@ jobs:
9393
id-token: write
9494
strategy:
9595
matrix:
96-
include:
97-
- freebsd-version: "13.2"
98-
- freebsd-version: "14.0"
96+
version: ["14.1", "13.4"]
97+
9998
steps:
10099
- name: Checkout code
101100
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
102101

103102
- name: Test in FreeBSD
104-
uses: vmactions/freebsd-vm@12c207ac1ba13827f25726fe93f9c2e6f685f0f3 # v1.0.8
103+
uses: vmactions/freebsd-vm@d7b8fcc7711aa41ad45e8d9b737cf90f035a7e3d # v1.1.3
105104
with:
106-
release: ${{ matrix.freebsd-version }}
105+
release: ${{ matrix.version }}
107106
envs: 'BUILD_DIR'
108107
usesh: true
109108
prepare: |

Pcap++/src/PcapLiveDevice.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,15 +1011,15 @@ namespace pcpp
10111011
return;
10121012
}
10131013

1014-
uint8_t buf[len];
1014+
std::vector<uint8_t> buf(len);
10151015

1016-
if (sysctl(mib, 6, buf, &len, nullptr, 0) < 0)
1016+
if (sysctl(mib, 6, buf.data(), &len, nullptr, 0) < 0)
10171017
{
10181018
PCPP_LOG_DEBUG("Error in retrieving MAC address: sysctl 2 error");
10191019
return;
10201020
}
10211021

1022-
struct if_msghdr* ifm = (struct if_msghdr*)buf;
1022+
struct if_msghdr* ifm = (struct if_msghdr*)buf.data();
10231023
struct sockaddr_dl* sdl = (struct sockaddr_dl*)(ifm + 1);
10241024
uint8_t* ptr = (uint8_t*)LLADDR(sdl);
10251025
m_MacAddress = MacAddress(ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5]);

0 commit comments

Comments
 (0)