Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RF24
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
RF24
Commits
2f2cb2bb
Commit
2f2cb2bb
authored
Apr 01, 2016
by
mz-fuzzy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avoid memory corruption when calling RF24::read(0) on linux machines
Signed-off-by:
mz-fuzzy
<
mzfuzzy800@gmail.com
>
parent
4c52feb2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
RF24.cpp
RF24.cpp
+5
-3
No files found.
RF24.cpp
View file @
2f2cb2bb
...
...
@@ -290,10 +290,12 @@ uint8_t RF24::read_payload(void* buf, uint8_t data_len)
status
=
*
prx
++
;
// 1st byte is status
if
(
data_len
>
0
)
{
while
(
--
data_len
)
// Decrement before to skip 1st status byte
*
current
++
=
*
prx
++
;
*
current
=
*
prx
;
}
endTransaction
();
#else
...
...
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