|WARNING| [2/2] net/cpfl: fix overflow on store of single-queue settings
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Tue Sep 15 11:21:20 CEST 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/169550
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-09-15
# DPDK Patch Review
## Patch 1/2: net/idpf: fix overflow on store of single-queue settings
### Summary
This patch fixes a buffer overflow where `parse_bool()` writes an `int` (4 bytes) to a `bool` variable (1 byte), causing 3 bytes of overflow.
### Errors
None identified.
### Warnings
None identified.
### Info
**Assignment pattern could be simplified**
The assignment `*i = (num == 1)` explicitly tests `num` against 1, but since we've already validated `num` is 0 or 1, the cast is sufficient.
Suggested simplification:
```c
*i = num;
```
This is clearer and relies on C's implicit `int`-to-`bool` conversion, which is well-defined for 0 and 1.
---
## Patch 2/2: net/cpfl: fix overflow on store of single-queue settings
### Summary
Identical fix to patch 1/2, applied to the cpfl driver.
### Errors
None identified.
### Warnings
None identified.
### Info
**Assignment pattern could be simplified** (same as patch 1/2)
```c
*i = num;
```
---
## Overall Assessment
Both patches correctly fix a real correctness bug (buffer overflow). The fixes are minimal, appropriate, and properly tagged with `Fixes:` and `Cc: stable at dpdk.org` for backporting.
The code quality is good. The only suggestion is a minor stylistic simplification of the boolean assignment, which does not affect correctness.
More information about the test-report
mailing list