mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-06-30 13:14:16 -04:00
netjack2: do some sanity checks on the MTU
It needs to be large enough foer the header, udp overhead and a uint32_t for each audio channel to be able to send the sync packet. Avoid string oob read when debugging the packet.
This commit is contained in:
parent
5a8a3b5a54
commit
67b70c8d23
2 changed files with 7 additions and 1 deletions
|
|
@ -133,7 +133,7 @@ struct nj2_packet_header {
|
|||
|
||||
static inline void nj2_dump_packet_header(struct nj2_packet_header *header)
|
||||
{
|
||||
pw_log_info("Type: %s", header->type);
|
||||
pw_log_info("Type: %.*s", (int)sizeof(header->type), header->type);
|
||||
pw_log_info("Data Type: %c", ntohl(header->data_type));
|
||||
pw_log_info("Data Stream: %c", ntohl(header->data_stream));
|
||||
pw_log_info("ID: %u", ntohl(header->id));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue