From eb8b7d6ef4794cadbc34cf97ee3bc53faeeac7cf Mon Sep 17 00:00:00 2001 From: Rolf Evers-Fischer Date: Mon, 13 Jun 2016 13:51:41 +0200 Subject: [PATCH] ifwitool: Fix calculation of dst_size Change-Id: I07523252eacffb323e2bb54c306f5e9ac83e4cbd Signed-off-by: Rolf Evers-Fischer Reviewed-on: https://review.coreboot.org/15162 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh Reviewed-by: Paul Menzel --- util/cbfstool/ifwitool.c | 4 ++-- 1 file 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;