We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3236ac0 commit 324dc55Copy full SHA for 324dc55
1 file changed
mazda/wireless/wireless.cpp
@@ -146,9 +146,10 @@ void BCAClient::ConnectionStatusResp(
146
const ::DBus::Struct <std::vector<uint8_t>> &terminalPath) {
147
if (serviceId == 15) {
148
char *pty = (char *) malloc(terminalPath._1.size());
149
- std::strncpy(pty, (char *) &terminalPath._1.begin(), terminalPath._1.size());
+ std::copy(terminalPath._1.begin(), terminalPath._1.end(), pty);
150
logd("\tPTY: %s\n", pty);
151
handle_connect(pty);
152
+ free(pty);
153
}
154
155
0 commit comments