Skip to content
This repository has been archived by the owner on Jan 20, 2025. It is now read-only.

Segfault / sentinel #1458

Open
dirkx opened this issue Dec 31, 2024 · 0 comments
Open

Segfault / sentinel #1458

dirkx opened this issue Dec 31, 2024 · 0 comments

Comments

@dirkx
Copy link

dirkx commented Dec 31, 2024

During a congested network - I got reproducable segaults in:

const auto datalast = data[datalen];

it appears that data can be NULL (and datalen = 0). Given that in line

if (datalen > 0)

this is only used when datalen >0 I suggest putting an

 uint8_t datalast;
 if (data && datalen>0)  datalast = data[datalen];

sentinel in.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant