Skip to contentSkip to conversation

pcapng: compile warning with gcc-16

DPDK/core Bug 1820 [email protected] 1 participant 1 message Nov 4, 2025

lore
Share & tools
lore
#0 lore raw

http://bugs.dpdk.org/show_bug.cgi?id=1820

            Bug ID: 1820
           Summary: pcapng: compile warning with gcc-16
           Product: DPDK
           Version: 25.07
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: core
          Assignee: [email protected]
          Reporter: [email protected]

Target Milestone: ---

../lib/pcapng/rte_pcapng.c:133:17: warning: ‘memcpy’ forming offset [2048, 65551] is out of the bounds [0, 2048] of object ‘buf’ with type ‘uint32_t[512]’ {aka ‘unsigned int[512]’} [-Warray-bounds=]

  133 |                 memcpy(popt->data, data, len);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../lib/pcapng/rte_pcapng.c: In function ‘rte_pcapng_write_stats’:
../lib/pcapng/rte_pcapng.c:336:18: note: ‘buf’ declared here
336 | uint32_t buf[PCAPNG_BLKSIZ];
| ^~~

Likely because comment could have a large size and overrun buffer?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.