mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
boundry check for tosend buffer
This commit is contained in:
parent
709b872498
commit
566d6dc4b7
1 changed files with 7 additions and 1 deletions
|
@ -292,6 +292,12 @@ void tosend_reset(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void tosend_stuffbit(int b) {
|
void tosend_stuffbit(int b) {
|
||||||
|
|
||||||
|
if (toSend.max >= TOSEND_BUFFER_SIZE - 1) {
|
||||||
|
Dbprintf(_RED_("toSend overflow"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (toSend.bit >= 8) {
|
if (toSend.bit >= 8) {
|
||||||
toSend.max++;
|
toSend.max++;
|
||||||
toSend.buf[toSend.max] = 0;
|
toSend.buf[toSend.max] = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue