summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4591b36)
Detected by Coverity in CID
1433363 and
1432121
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
uint8_t type, uint8_t len, const void *data)
{
uint8_t *c = *cookie;
uint8_t type, uint8_t len, const void *data)
{
uint8_t *c = *cookie;
- if (*cookie + 2 + len > (uint8_t*)&msg[1])
+ uint8_t *end = (uint8_t *)msg + sizeof(*msg);
+
+ if (*cookie + 2 + len > end)