Correct error message if overflow is detected.
Change-Id: I8a915c7353d49822c046fbc36241237b370e6c98
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
/* 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;
}