1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-03-06 11:03:29 +00:00

Replaces unchecked strcpy with strlcpy.

This commit is contained in:
Nick Briggs
2025-05-19 16:54:34 -07:00
parent 987fa637a9
commit 24327920f2

View File

@@ -358,7 +358,7 @@ int fork_Unix(void) {
(void)snprintf(PipeName, sizeof(PipeName), "/tmp/LPU%ld-%d", StartTime, slot);
memset(&addr, 0, sizeof(struct sockaddr_un));
addr.sun_family = AF_UNIX;
strcpy(addr.sun_path, PipeName);
strlcpy(addr.sun_path, PipeName, sizeof(addr.sun_path));
status =
connect(sock, (struct sockaddr *)&addr, sizeof(struct sockaddr_un));
if (status < 0) {