Skip to content
Snippets Groups Projects
Commit 67ab0a5e authored by Stephen Warren's avatar Stephen Warren Committed by Tom Rini
Browse files

dfu: fix readback buffer overflow test


The buffer is too small if it's < size to read, not if it's <= the size.
This fixes the 1MB test case on Tegra, which has a 1MB buffer.

Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
parent 54ce79c8
No related branches found
No related tags found
No related merge requests found
......@@ -332,7 +332,7 @@ int dfu_read(struct dfu_entity *dfu, void *buf, int size, int blk_seq_num)
case DFU_RAM_ADDR:
break;
default:
if (dfu->r_left >= dfu_buf_size) {
if (dfu->r_left > dfu_buf_size) {
printf("%s: File too big for buffer\n",
__func__);
return -EOVERFLOW;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment