mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-16 11:47:35 +08:00
Reject mixer definition lines too short to be valid.
This commit is contained in:
@@ -187,6 +187,9 @@ mixer_getline(int fd, char *line, unsigned maxlen)
|
||||
/* line termination */
|
||||
if (c == '\n') {
|
||||
/* ignore malformed lines */
|
||||
if ((p - line) < 4)
|
||||
break;
|
||||
|
||||
if (line[1] != ':')
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user