Skip to content

Conversation

@dTenebrae
Copy link

Call stack ..-> gip_dispatch_pkt() -> gip_handle_pkt_announce() -> gip_request_identification()->gip_send_pkt(client, &hdr, NULL) leads to NULL dereference in memcpy function. Quite sure, it can't really happen in real life, but compiler spams an error:

bus/protocol.c:382:9: error: argument 2 null where non-null expected [-Werror=nonnull]
  382 |         memcpy(client->chunk_buf_in->data, data, hdr->chunk_offset);

This NULL check will calm down a compiler.

Call stack  ..-> gip_dispatch_pkt() -> gip_handle_pkt_announce()
-> gip_request_identification()->gip_send_pkt(client, &hdr, NULL)
leads to NULL dereference in memcpy function. Quite sure, it
can't really happen in real life, but compiler spams an error:

```
bus/protocol.c:382:9: error: argument 2 null where non-null expected [-Werror=nonnull]
  382 |         memcpy(client->chunk_buf_in->data, data, hdr->chunk_offset);
```

This NULL check will calm down a compiler.
@dlundqvist
Copy link

Sorry, I missed this PR but added something similar to my fork (dlundqvist/xone@aeb27e6).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants