Skip to content

Commit 324dc55

Browse files
committed
s
1 parent 3236ac0 commit 324dc55

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

mazda/wireless/wireless.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,10 @@ void BCAClient::ConnectionStatusResp(
146146
const ::DBus::Struct <std::vector<uint8_t>> &terminalPath) {
147147
if (serviceId == 15) {
148148
char *pty = (char *) malloc(terminalPath._1.size());
149-
std::strncpy(pty, (char *) &terminalPath._1.begin(), terminalPath._1.size());
149+
std::copy(terminalPath._1.begin(), terminalPath._1.end(), pty);
150150
logd("\tPTY: %s\n", pty);
151151
handle_connect(pty);
152+
free(pty);
152153
}
153154
}
154155

0 commit comments

Comments
 (0)