summaryrefslogtreecommitdiff
path: root/util/cbfstool/ifwitool.c
diff options
context:
space:
mode:
authorRolf Evers-Fischer <embedded24@evers-fischer.de>2016-06-13 13:51:41 +0200
committerFurquan Shaikh <furquan@google.com>2016-06-15 17:37:17 +0200
commiteb8b7d6ef4794cadbc34cf97ee3bc53faeeac7cf (patch)
tree37b6f667ae7a3ec3a2cf51934285c6852958297a /util/cbfstool/ifwitool.c
parent82a612202be6926b0445ba50d3b18c227b07bce8 (diff)
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>
Diffstat (limited to 'util/cbfstool/ifwitool.c')
-rw-r--r--util/cbfstool/ifwitool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/cbfstool/ifwitool.c b/util/cbfstool/ifwitool.c
index 7fca542322..a1365bd3ee 100644
--- a/util/cbfstool/ifwitool.c
+++ b/util/cbfstool/ifwitool.c
@@ -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;