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
19436d9d
Commit
19436d9d
authored
Oct 30, 2014
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #926 from DonLakeFlyer/BufferOverun
Fix crash caused by buffer overrun
parents
d812056a
8a3dfa0a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
UAS.cc
src/uas/UAS.cc
+2
-2
No files found.
src/uas/UAS.cc
View file @
19436d9d
...
...
@@ -2553,8 +2553,8 @@ void UAS::requestParameter(int component, const QString& parameter)
{
emit
textMessageReceived
(
uasId
,
0
,
MAV_SEVERITY_WARNING
,
QString
(
"QGC WARNING: Parameter name %1 is more than %2 bytes long. This might lead to errors and mishaps!"
).
arg
(
parameter
).
arg
(
MAVLINK_MSG_PARAM_REQUEST_READ_FIELD_PARAM_ID_LEN
-
1
));
}
memcpy
(
read
.
param_id
,
parameter
.
toStdString
().
c_str
(),
qMax
(
parameter
.
length
(),
MAVLINK_MSG_PARAM_REQUEST_READ_FIELD_PARAM_ID_LEN
));
read
.
param_id
[
15
]
=
'\0'
;
// Enforce null termination
strncpy
(
read
.
param_id
,
parameter
.
toStdString
().
c_str
(),
sizeof
(
read
.
param_id
));
read
.
param_id
[
sizeof
(
read
.
param_id
)
-
1
]
=
'\0'
;
// Enforce null termination
read
.
target_system
=
uasId
;
read
.
target_component
=
component
;
mavlink_msg_param_request_read_encode
(
mavlink
->
getSystemId
(),
mavlink
->
getComponentId
(),
&
msg
,
&
read
);
...
...
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