Commit 9be33a52 authored by Achim Morschhauser's avatar Achim Morschhauser
Browse files

memcpy instead of strcpy

parent 2487d39b
......@@ -623,9 +623,8 @@ int driver_serial::flush() {
int driver_serial::set_term(const char* term, int termlen) {
this->term = (char *) malloc(termlen + 1);
this->term = "";
strlcpy(this->term, term,termlen);
memcpy(this->term, term,termlen);
this->term[termlen] = 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment