Skip to content

Commit 2fb64be

Browse files
committed
Replaces unchecked strcpy with strlcpy.
1 parent 3c6ffa3 commit 2fb64be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/unixfork.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ int fork_Unix(void) {
358358
(void)snprintf(PipeName, sizeof(PipeName), "/tmp/LPU%ld-%d", StartTime, slot);
359359
memset(&addr, 0, sizeof(struct sockaddr_un));
360360
addr.sun_family = AF_UNIX;
361-
strcpy(addr.sun_path, PipeName);
361+
strlcpy(addr.sun_path, PipeName, sizeof(addr.sun_path));
362362
status =
363363
connect(sock, (struct sockaddr *)&addr, sizeof(struct sockaddr_un));
364364
if (status < 0) {

0 commit comments

Comments
 (0)