Skip to content

Commit 3c6ffa3

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ldeether.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ int main(int argc, char *argv[]) {
200200
goto I_Give_Up;
201201
}
202202
bcopy(if_data.ifc_req[0].ifr_addr.sa_data, ether_host, 6);
203-
strcpy(Ename, if_data.ifc_req[0].ifr_name);
203+
strlcpy(Ename, if_data.ifc_req[0].ifr_name, sizeof(Ename));
204204

205205
fcntl(ether_fd, F_SETFL, fcntl(ether_fd, F_GETFL, 0) | O_ASYNC | O_NONBLOCK);
206206

0 commit comments

Comments
 (0)