projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
54ce79c
)
dfu: fix readback buffer overflow test
author
Stephen Warren
<swarren@nvidia.com>
Tue, 1 Jul 2014 18:16:57 +0000
(12:16 -0600)
committer
Tom Rini
<trini@ti.com>
Sat, 9 Aug 2014 15:17:01 +0000
(11:17 -0400)
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: Stephen Warren <swarren@nvidia.com>
drivers/dfu/dfu.c
patch
|
blob
|
history
diff --git
a/drivers/dfu/dfu.c
b/drivers/dfu/dfu.c
index
6cd3fbb
..
3512b14
100644
(file)
--- a/
drivers/dfu/dfu.c
+++ b/
drivers/dfu/dfu.c
@@
-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;