-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
coap_get_data() sets not exactly right pointer #4
Comments
Seems like i'm a bit misunderstood valgrind... Sorry about that |
nevermind
|
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Nov 5, 2022
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Nov 5, 2022
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Nov 5, 2022
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Nov 5, 2022
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Nov 5, 2022
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Nov 7, 2022
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Nov 28, 2022
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Nov 30, 2022
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Dec 9, 2022
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Dec 13, 2022
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Dec 17, 2022
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Dec 20, 2022
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Dec 30, 2022
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Dec 30, 2022
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Jan 2, 2023
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Jan 2, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The actual data is stored in position pdu->data++;
https://github.com/obgm/libcoap/blob/develop/src/pdu.c#L264
But the set value will be pdu->data which is
COAP_PAYLOAD_START
So user must pay attention to that and increment data to get actual payload.
I would suggest to consider actually mentioning it in function description or change it return pointer to actual payload.
BTW: Also question is the same for received PDU?
From my experience it seems not to be so.
p.s. the problem is detected by valgrind when i trying to verify payload of created pdu
The text was updated successfully, but these errors were encountered: