From 44f14627110b483932e6c9877c5432a6ddace119 Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Sat, 20 Jan 2024 17:03:37 +0300 Subject: [PATCH] module-rtp-sap: fix strncpy bounds --- src/modules/module-rtp-sap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/module-rtp-sap.c b/src/modules/module-rtp-sap.c index f6f21f07d..496e1740f 100644 --- a/src/modules/module-rtp-sap.c +++ b/src/modules/module-rtp-sap.c @@ -396,7 +396,7 @@ static int make_unix_socket(char *path, char *client_path) { spa_zero(client_addr); client_addr.sun_family = AF_UNIX; - strncpy(client_addr.sun_path, client_path, strlen(client_path)); + strncpy(client_addr.sun_path, client_path, strlen(client_addr.sun_path)); if (bind(fd, (struct sockaddr *)&client_addr, sizeof(client_addr)) < 0) { pw_log_warn("Failed to bind PTP management socket");