mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-03 05:21: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 */
|
/* line termination */
|
||||||
if (c == '\n') {
|
if (c == '\n') {
|
||||||
/* ignore malformed lines */
|
/* ignore malformed lines */
|
||||||
|
if ((p - line) < 4)
|
||||||
|
break;
|
||||||
|
|
||||||
if (line[1] != ':')
|
if (line[1] != ':')
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user