diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index d1a4fa5a47..a8639934c7 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -72,9 +72,9 @@ jobs: config-zstd: OFF - image: ubuntu2004-zstd config-zstd: ON - - image: fedora39 + - image: fedora40 config-zstd: OFF - - image: alpine317 + - image: alpine320 config-zstd: OFF steps: @@ -585,12 +585,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - version: ["14.0", "13.2"] + version: ["14.1", "13.4"] steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Test in FreeBSD id: test - uses: vmactions/freebsd-vm@12c207ac1ba13827f25726fe93f9c2e6f685f0f3 # v1.0.8 + uses: vmactions/freebsd-vm@d7b8fcc7711aa41ad45e8d9b737cf90f035a7e3d # v1.1.3 with: release: ${{ matrix.version }} usesh: true diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 18be35778a..3089fbdf3e 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -39,9 +39,9 @@ jobs: config-zstd: OFF - image: rhel94 config-zstd: OFF - - image: fedora39 + - image: fedora40 config-zstd: OFF - - image: alpine317 + - image: alpine320 config-zstd: OFF steps: @@ -93,17 +93,16 @@ jobs: id-token: write strategy: matrix: - include: - - freebsd-version: "13.2" - - freebsd-version: "14.0" + version: ["14.1", "13.4"] + steps: - name: Checkout code uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Test in FreeBSD - uses: vmactions/freebsd-vm@12c207ac1ba13827f25726fe93f9c2e6f685f0f3 # v1.0.8 + uses: vmactions/freebsd-vm@d7b8fcc7711aa41ad45e8d9b737cf90f035a7e3d # v1.1.3 with: - release: ${{ matrix.freebsd-version }} + release: ${{ matrix.version }} envs: 'BUILD_DIR' usesh: true prepare: | diff --git a/Pcap++/src/PcapLiveDevice.cpp b/Pcap++/src/PcapLiveDevice.cpp index 7ac0f79edc..5faa7c4dca 100644 --- a/Pcap++/src/PcapLiveDevice.cpp +++ b/Pcap++/src/PcapLiveDevice.cpp @@ -1011,15 +1011,15 @@ namespace pcpp return; } - uint8_t buf[len]; + std::vector buf(len); - if (sysctl(mib, 6, buf, &len, nullptr, 0) < 0) + if (sysctl(mib, 6, buf.data(), &len, nullptr, 0) < 0) { PCPP_LOG_DEBUG("Error in retrieving MAC address: sysctl 2 error"); return; } - struct if_msghdr* ifm = (struct if_msghdr*)buf; + struct if_msghdr* ifm = (struct if_msghdr*)buf.data(); struct sockaddr_dl* sdl = (struct sockaddr_dl*)(ifm + 1); uint8_t* ptr = (uint8_t*)LLADDR(sdl); m_MacAddress = MacAddress(ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5]);