projects
/
proxmark3-svn
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8647c5
)
fix length test
274/head
author
marshmellow42
<marshmellowrf@gmail.com>
Mon, 10 Apr 2017 15:38:11 +0000
(11:38 -0400)
committer
marshmellow42
<marshmellowrf@gmail.com>
Mon, 10 Apr 2017 15:38:11 +0000
(11:38 -0400)
thanks @pwpiwi for catching what i missed.
client/cmddata.c
patch
|
blob
|
blame
|
history
diff --git
a/client/cmddata.c
b/client/cmddata.c
index 2f508efcc5744fb6da8f1c3f1c91ed95742ebf7f..823da9cef465da873660e1b147d4ea745bac91d2 100644
(file)
--- a/
client/cmddata.c
+++ b/
client/cmddata.c
@@
-40,8
+40,8
@@
void setDemodBuf(uint8_t *buff, size_t size, size_t startIdx)
if (buff == NULL)
return;
- if ( size
+ startIdx >= MAX_DEMOD_BUF_LEN
)
- size = MAX_DEMOD_BUF_LEN;
+ if ( size
> MAX_DEMOD_BUF_LEN - startIdx
)
+ size = MAX_DEMOD_BUF_LEN
- startIdx
;
size_t i = 0;
for (; i < size; i++){
Impressum
,
Datenschutz