diff options
author | schrewe <73848196+schrewe@users.noreply.github.com> | 2020-12-07 01:17:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-07 09:17:16 +0900 |
commit | af734fe097ed379b0aa5fcf551886b1ce5098052 (patch) | |
tree | cea13116c74e112be58a4161461db77a9b6ebb1a /src/shared/dlt_user_shared.h | |
parent | ff4f44c159df6f44b48bd38c9d2f104eb360be11 (diff) | |
download | DLT-daemon-af734fe097ed379b0aa5fcf551886b1ce5098052.tar.gz |
Check size of ring buffer (#269)
There is no check if "data" fits into the ring buffer buffer.
This causes a write heap buffer overflow.
If data is too big for the ringbuffer nothing is written to the
ringbuffer and a error is logged
If the buffers are bigger than the free space in the ringbuffer, the
ringbuffer is increased by a step size set at initialization.
But there is no check if this increase was sufficient.
Fix this by using a while loop that increases the ring buffer size until
it is big enough or the buffer can not be further increased.
Signed-off-by: Jan Schrewe <schrewe@uni-bonn.de>
Diffstat (limited to 'src/shared/dlt_user_shared.h')
0 files changed, 0 insertions, 0 deletions