Skip to content

Commit

Permalink
Fixed SocketCAN bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Bing-Rover committed Sep 27, 2023
1 parent 541a83f commit 6f67b94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/burt_can/burt_can.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ BurtCanStatus burt_can::BurtCan::open() {
}

// Define the interface we'll use on the socket
strncpy(ifr.ifr_name, interface, strlen(interface));
strcpy(ifr.ifr_name, interface);
ioctl(handle, SIOCGIFINDEX, &ifr);
if (!ifr.ifr_ifindex) {
return BurtCanStatus::INTERFACE_PARSE_ERROR;
Expand Down

0 comments on commit 6f67b94

Please sign in to comment.