Message ID | 20181214144214.1260-13-peter.maydell@linaro.org |
---|---|
State | Accepted |
Commit | 5250b09e57d9989efc69353d18416aedde00995e |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2164619ljp; Fri, 14 Dec 2018 06:55:10 -0800 (PST) X-Google-Smtp-Source: AFSGD/XDg+Lt/5ilZnaQerdgWpOoBP2LmGdVkeRYt3poH9pjysowzdxh+cPpP0Qeg8U4xsAbIMZD X-Received: by 2002:a0c:a4a3:: with SMTP id x32mr3030115qvx.89.1544799310210; Fri, 14 Dec 2018 06:55:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544799310; cv=none; d=google.com; s=arc-20160816; b=J/o8ktkSIq3qVhRvTVkVoahod64vWusEF4omdk8A6cV+Kil9M7aWSev+ZtBm7ZWauY 2gCLNQlpngk/pthESx/czhGzpnHo7/ZcDV5Oq1uDGlM483tG8jdCM31h/YF7GFGy0QWl 95yeE6/PBsW+XyMt3/d6B/ltroYqWs1ZriKiYOnP+KXvHikMXsKG60oxLGihDmLnxT2L 90A3J/adHwsYQ2AB85mhzLLHvBZdadN38AX1m6cjWC8GrSw73GMUj5No11OLBYnT+olJ Sawa/ng/ACY34AL/j3DWvJ/NumfZTbX7MjJXKJ6bOvOp16fa6L7qi7kFiSqN16Lm+9w9 yGmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=Zy7S4o1N56Wl2cznuhDgZ981mBSU7vjCOj8z5aNq8f8=; b=lJw9n4IF3ds5gnjexE6/jLS2rrdSEqHD4WRdv7yK03ofcbEqQYZ9MiCsO5/68U7Flq qLGMPmcKx9P8kvqSJ8kKdiQrDyo0fCfD5et45ucbg4oCPjFJ+RF90kbGPYYcy/kip/V9 eBAZfnqYLuuQSQObgkTzvO5nZIKf90QJ7qf0WA35/uosLbfsCJISLZDVynUNbknKWtfd 6en7CD7kB+4hYhz/i8Kvl6LMNrx0fXrUmsxBf5pyUgQfboTDZl3YjZSxXiVd887nqMCj lL5BorHkbIvANksSITFllyFi0PZdGZowv8Ji9Z8u/iC1qMCPv/YVqbTDxJ+DlVlm15fe VtDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="f5B6MV/Q"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id k5si2953762qkb.174.2018.12.14.06.55.09 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 14 Dec 2018 06:55:10 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="f5B6MV/Q"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:33938 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1gXort-0003n5-Gz for patch@linaro.org; Fri, 14 Dec 2018 09:55:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <peter.maydell@linaro.org>) id 1gXofh-0008VU-Pr for qemu-devel@nongnu.org; Fri, 14 Dec 2018 09:42:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <peter.maydell@linaro.org>) id 1gXofg-0004QN-Mo for qemu-devel@nongnu.org; Fri, 14 Dec 2018 09:42:33 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:39390) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <peter.maydell@linaro.org>) id 1gXofg-0004Pt-FC for qemu-devel@nongnu.org; Fri, 14 Dec 2018 09:42:32 -0500 Received: by mail-wm1-x330.google.com with SMTP id f81so6003708wmd.4 for <qemu-devel@nongnu.org>; Fri, 14 Dec 2018 06:42:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Zy7S4o1N56Wl2cznuhDgZ981mBSU7vjCOj8z5aNq8f8=; b=f5B6MV/Q7SnhMvWEv3sji4E7wpBKXEzuJ4nqqGsjWtL4iWfkhfIXhIB9/NnqO7YYNq 1ztPUd3mycy7bx/+6aVp89g2ck815gTsS3AyhxVjzdlp1sLvk3Tdx9ktgdTCj6Q8SqPP YLnJNQt72EoMiUmx1tUPZc7sjp5DE9mzBcvXY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Zy7S4o1N56Wl2cznuhDgZ981mBSU7vjCOj8z5aNq8f8=; b=jEv7P/KXBsvEthrjYgmmt/wf2gP0YhtXzA+uwtljN4bfxqvj9UkKQBof1etOyqDwFS SU+VKoRlQm+5nflA1hc1yJcyWsJo/ALQ4ImBoXdkUOYDK3Xa3IO2wwfK+RqcWtyJjY5D 9gdy8jeJTgnCjt9c5hui6KGosMamR/OB1TvaQ68NLFNlsMtpAYc5o7C7sRrbbUBCS/1U MLwUoIRyFHq5M2KSGK5UaXOakqaFKTz/YcYxRwVSD+3+/o1tYMUaPuwHQ3k8ldIdah9y IQpo7ih8aSlRhUtZmfWxPyfKbSmLevtbUKn8XrM4AUuMdwIyuiUeeGgHIyE1neyJi+ru yOUA== X-Gm-Message-State: AA+aEWaCfZ/KGWFD/2yJ73n00vg8DG3SkyTuyanLDn6bc5Xz5gERC/t8 UoedQXKDhEgT84+AL67tY8XpWOQSgXw= X-Received: by 2002:a1c:934b:: with SMTP id v72mr3675507wmd.5.1544798551184; Fri, 14 Dec 2018 06:42:31 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id m6sm3263204wrv.24.2018.12.14.06.42.30 for <qemu-devel@nongnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Dec 2018 06:42:30 -0800 (PST) From: Peter Maydell <peter.maydell@linaro.org> To: qemu-devel@nongnu.org Date: Fri, 14 Dec 2018 14:42:04 +0000 Message-Id: <20181214144214.1260-13-peter.maydell@linaro.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181214144214.1260-1-peter.maydell@linaro.org> References: <20181214144214.1260-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::330 Subject: [Qemu-devel] [PULL 12/22] hw/i386/multiboot.c: Don't use load_image() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
misc queue
|
expand
|
diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c index 1a4344f5fc3..62340687e8e 100644 --- a/hw/i386/multiboot.c +++ b/hw/i386/multiboot.c @@ -343,7 +343,11 @@ int load_multiboot(FWCfgState *fw_cfg, mbs.mb_buf_size = TARGET_PAGE_ALIGN(mb_mod_length + mbs.mb_buf_size); mbs.mb_buf = g_realloc(mbs.mb_buf, mbs.mb_buf_size); - load_image(one_file, (unsigned char *)mbs.mb_buf + offs); + if (load_image_size(one_file, (unsigned char *)mbs.mb_buf + offs, + mbs.mb_buf_size - offs) < 0) { + error_report("Error loading file '%s'", one_file); + exit(1); + } mb_add_mod(&mbs, mbs.mb_buf_phys + offs, mbs.mb_buf_phys + offs + mb_mod_length, c);