Skip to content

dawn_iwinfo: drop local redefinition of IWINFO_BUFSIZE - #274

Merged
PolynomialDivision merged 1 commit into
berlin-open-wireless-lab:masterfrom
micpf:fix/iwinfo-bufsize-redefinition
Aug 10, 2026
Merged

dawn_iwinfo: drop local redefinition of IWINFO_BUFSIZE#274
PolynomialDivision merged 1 commit into
berlin-open-wireless-lab:masterfrom
micpf:fix/iwinfo-bufsize-redefinition

Conversation

@micpf

@micpf micpf commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

IWINFO_BUFSIZE is already defined by libiwinfo's <iwinfo.h>, which is included at the top of src/utils/dawn_iwinfo.c. Redefining it locally with a different value (24 KiB here vs. 96 KiB in current libiwinfo) causes a compiler warning about macro redefinition, and — more importantly — means the char buf[IWINFO_BUFSIZE] stack buffers in this file are smaller than what libiwinfo may write into them (e.g. via iw->assoclist()).

Just drop the local #define and rely on the header's value.

No functional change beyond the buffer size following libiwinfo.

IWINFO_BUFSIZE is already defined by libiwinfo's <iwinfo.h>, which is
included at the top of this file. Redefining it locally with a
different value (24 KiB vs. 96 KiB in current libiwinfo) causes a
compiler warning about macro redefinition and, more importantly, means
the buffers allocated in this file are smaller than what libiwinfo may
write into them. Rely on the header's definition instead.

Signed-off-by: Michael Pfeifroth <micpf@westermo.com>
@PolynomialDivision

Copy link
Copy Markdown
Collaborator

looks good to me thanks!

@PolynomialDivision
PolynomialDivision merged commit ae8e6a7 into berlin-open-wireless-lab:master Aug 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants