|SUCCESS| pw159220 [PATCH v5 09/17] eal: avoid format overflow when handling addresses
0-day Robot
robot at bytheb.org
Tue Dec 16 17:12:17 CET 2025
Test-Label: 0day Robot - Claude SONNET
Test-Status: SUCCESS
http://dpdk.org/patch/159220
_AI Review Comments Available_
I need to generate the complete unified diff for this commit. Let me call the commit function to get the full diff.
```bash
git show --no-merges --format=fuller c62edf5e55..HEAD -- lib/eal/common/eal_common_memory.c
```
Let me get the proper git sha and commit details for this patch:
```bash
git log --oneline -1 --grep="eal: avoid format overflow when handling addresses"
```
Since I need to review the patch as provided, let me analyze what's available:
**Git SHA:** Not provided in patch (needs to be obtained)
**Author:** Stephen Hemminger <stephen at networkplumber.org>
**Subject:** eal: avoid format overflow when handling addresses
**Summary:** This commit increases the ADDR_STR buffer size from 15 to 20
characters to prevent overflow when formatting 64-bit addresses as hex
strings, noting that the largest possible value 0xFFFFFFFFFFFFFFFF would
overflow the original 15-character buffer.
> diff --git a/lib/eal/common/eal_common_memory.c b/lib/eal/common/eal_common_memory.c
> index c62edf5e55..2633857db5 100644
> --- a/lib/eal/common/eal_common_memory.c
> +++ b/lib/eal/common/eal_common_memory.c
> @@ -1153,7 +1153,7 @@ rte_eal_memory_init(void)
> #define EAL_MEMSEG_INFO_REQ "/eal/memseg_info"
> #define EAL_ELEMENT_LIST_REQ "/eal/mem_element_list"
> #define EAL_ELEMENT_INFO_REQ "/eal/mem_element_info"
> -#define ADDR_STR 15
> +#define ADDR_STR 20 /* 16 bytes 64 bit + 0x */
Does the comment accurately describe the buffer requirements? A 64-bit
value formatted as hex with "0x" prefix requires exactly 18 characters
(2 for "0x" + 16 for hex digits), plus 1 for null terminator equals 19
characters minimum. While 20 provides a small safety margin, would it be
clearer to size this as exactly what's needed or document why the extra
byte is included?
More information about the test-report
mailing list