Commit 2487d39b authored by Achim Morschhauser's avatar Achim Morschhauser
Browse files

strlcpy in driver_serial

parent 6b2dc0cb
......@@ -623,8 +623,9 @@ int driver_serial::flush() {
int driver_serial::set_term(const char* term, int termlen) {
this->term = (char *) malloc(termlen + 1);
strcpy(this->term, term);
this->term = "";
strlcpy(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