Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
0c4cec1f
Commit
0c4cec1f
authored
Jul 27, 2017
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Buffer overrun in UAS.cc
parent
2396eb6e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
11 deletions
+9
-11
UAS.cc
src/uas/UAS.cc
+6
-9
UAS.h
src/uas/UAS.h
+3
-2
No files found.
src/uas/UAS.cc
View file @
0c4cec1f
...
...
@@ -131,17 +131,11 @@ UAS::UAS(MAVLinkProtocol* protocol, Vehicle* vehicle, FirmwarePluginManager * fi
_firmwarePluginManager
(
firmwarePluginManager
)
{
for
(
unsigned
int
i
=
0
;
i
<
255
;
++
i
)
{
componentID
[
i
]
=
-
1
;
componentMulti
[
i
]
=
false
;
}
#ifndef __mobile__
connect
(
_vehicle
,
&
Vehicle
::
mavlinkMessageReceived
,
&
fileManager
,
&
FileManager
::
receiveMessage
);
color
=
UASInterface
::
getNextColor
();
#endif
color
=
UASInterface
::
getNextColor
();
}
/**
...
...
@@ -210,10 +204,11 @@ void UAS::receiveMessage(mavlink_message_t message)
}
// Store component ID
if
(
componentID
[
message
.
msgid
]
==
-
1
)
if
(
!
componentID
.
contains
(
message
.
msgid
)
)
{
// Prefer the first component
componentID
[
message
.
msgid
]
=
message
.
compid
;
componentMulti
[
message
.
msgid
]
=
false
;
}
else
{
...
...
@@ -225,7 +220,9 @@ void UAS::receiveMessage(mavlink_message_t message)
}
}
if
(
componentMulti
[
message
.
msgid
]
==
true
)
multiComponentSourceDetected
=
true
;
if
(
componentMulti
[
message
.
msgid
]
==
true
)
{
multiComponentSourceDetected
=
true
;
}
switch
(
message
.
msgid
)
...
...
src/uas/UAS.h
View file @
0c4cec1f
...
...
@@ -348,8 +348,9 @@ protected:
virtual
void
processParamValueMsg
(
mavlink_message_t
&
msg
,
const
QString
&
paramName
,
const
mavlink_param_value_t
&
rawValue
,
mavlink_param_union_t
&
paramValue
);
int
componentID
[
256
];
bool
componentMulti
[
256
];
QMap
<
int
,
int
>
componentID
;
QMap
<
int
,
bool
>
componentMulti
;
bool
connectionLost
;
///< Flag indicates a timed out connection
quint64
connectionLossTime
;
///< Time the connection was interrupted
quint64
lastVoltageWarning
;
///< Time at which the last voltage warning occurred
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment