Skip to content
Commit ea191bdd authored by Robert Lubos's avatar Robert Lubos Committed by Benjamin Cabé
Browse files

net: pkt: Fix fixed buffer allocation with headroom bug



The size calculation for the first buffer, in case extra headroom is
requested, had a bug which could result in a size variable underflow
followed by net_buf exhaustion.

In case the net_buf size was larger than requested size, but smaller
than requested size + headroom, the whole buffer size was subtracted
from the requested size. This however did not take the extra headroom
into account and in effect could result in underflow.

Signed-off-by: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
parent 14a00f25
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment