Skip to content
Snippets Groups Projects
Unverified Commit 0da2a7c4 authored by T-X's avatar T-X Committed by Matthias Schiffer
Browse files

gluon-neighbour-info: fix broken output with large results (#2322)


Currently a buffer with a fixed size of 8192 bytes is used. However the
result can potentially be larger, which leads to a truncated JSON
output on stdout. UDP packets, without compression and with IP
fragmentation, can be up to 64KiB large.

Instead of using a fixed size buffer on the stack ask the kernel first
about the size of the UDP data and allocate a buffer of appropriate size
on the heap before receiving the UDP data.

The issue was observed with a custom respondd provider.

Signed-off-by: default avatarLinus Lüssing <linus.luessing@c0d3.blue>
(cherry picked from commit 531937cf)
parent ff4050d8
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment