ifwitool: Fix calculation of dst_size

Change-Id: I07523252eacffb323e2bb54c306f5e9ac83e4cbd
Signed-off-by: Rolf Evers-Fischer <embedded24@evers-fischer.de>
Reviewed-on: https://review.coreboot.org/15162
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
Rolf Evers-Fischer 2016-06-13 13:51:41 +02:00 committed by Furquan Shaikh
parent 82a612202b
commit eb8b7d6ef4
1 changed files with 2 additions and 2 deletions

View File

@ -1679,8 +1679,8 @@ static enum ifwi_ret ifwi_dir_replace(int type)
}
struct buffer dst;
size_t dst_size = buffer_size(&ifwi_image.subpart_buf[type] +
buffer_size(&b) - s->e[i].length);
size_t dst_size = buffer_size(&ifwi_image.subpart_buf[type]) +
buffer_size(&b) - s->e[i].length;
size_t subpart_start = s->e[i].offset;
size_t subpart_end = s->e[i].offset + s->e[i].length;