projects
/
profile
/
common
/
platform
/
kernel
/
u-boot-artik.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
519e2b3
)
dfu:cosmetic: Fix printf text for buffer overflow condition
author
Lukasz Majewski
<l.majewski@samsung.com>
Tue, 10 Sep 2013 13:29:22 +0000
(15:29 +0200)
committer
Chanho Park
<chanho61.park@samsung.com>
Wed, 22 Jul 2015 12:00:42 +0000
(21:00 +0900)
Correct error message if overflow is detected.
Change-Id: I8a915c7353d49822c046fbc36241237b370e6c98
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
drivers/dfu/dfu.c
patch
|
blob
|
history
diff --git
a/drivers/dfu/dfu.c
b/drivers/dfu/dfu.c
index a06db2fd1256b22d0233e175f932973bf6de6370..b08835e6d842dcde5fd4452e09e5c657f0601bcc 100644
(file)
--- a/
drivers/dfu/dfu.c
+++ b/
drivers/dfu/dfu.c
@@
-165,8
+165,8
@@
int dfu_write(struct dfu_entity *dfu, void *buf, int size, int blk_seq_num)
/* we should be in buffer now (if not then size too large) */
if ((dfu->i_buf + size) > dfu->i_buf_end) {
-
printf("%s: Wrong size! [%d] [%d] - %d\n"
,
-
__func__, dfu->i_blk_seq_num, blk_seq_num, size
);
+
error("Buffer overflow! (0x%p + 0x%x > 0x%p)\n", dfu->i_buf
,
+
size, dfu->i_buf_end
);
return -1;
}