Skip to content

Commit

Permalink
Size checking increase
Browse files Browse the repository at this point in the history
  • Loading branch information
atc1441 committed Dec 17, 2021
1 parent 894d21f commit ab4eb98
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file modified Firmware/ATC_Paper.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion Firmware/src/epd_ble_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ int epd_ble_handle_write(void * p) {
return 0;
// Write data to image buffer.
case 0x03:
if (byte_pos + payload_len - 1 >= sizeof(image)) {
if (byte_pos + payload_len - 1 >= sizeof(image)+1) {
return 0;
}
memcpy(image + byte_pos, payload + 1, payload_len - 1);
Expand Down

0 comments on commit ab4eb98

Please sign in to comment.