Message ID | 20180723201748.25573-24-mdroth@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E0ADE14BC for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 23 Jul 2018 20:37:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDC582844B for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 23 Jul 2018 20:37:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C1D5128498; Mon, 23 Jul 2018 20:37:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6A2932844B for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 23 Jul 2018 20:37:02 +0000 (UTC) Received: from localhost ([::1]:36434 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1fhhZl-00016G-Kw for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 Jul 2018 16:37:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <flukshun@gmail.com>) id 1fhhIa-0001i5-75 for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:19:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <flukshun@gmail.com>) id 1fhhIZ-0002yw-6O for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:19:16 -0400 Received: from mail-oi0-x244.google.com ([2607:f8b0:4003:c06::244]:35582) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <flukshun@gmail.com>) id 1fhhIZ-0002yM-1q; Mon, 23 Jul 2018 16:19:15 -0400 Received: by mail-oi0-x244.google.com with SMTP id i12-v6so3495656oik.2; Mon, 23 Jul 2018 13:19:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=vJNEMM5J7/Qf1SBLTqXhH7G0om3Wy3P6uvuPWDo0iPY=; b=qHQlCJJZuQoSJa3mF3dgQUMOZL6nKs3nqlxkkjJAQj56ufgWrJtQ44EfRG9+ZZeyWz cb9LmeLyIXSziudG/ikw5KTJcc3Aqs46m+9975F0cNR7iNwoWLVCuQvhm+nvIj4/J5u1 V3yjFPBWI6mIB5pJDy4a+T2pNLr/NNUqW8pj1PYW+45ojMZV+mPGS2J9plJgmr9AXRkG +ESMUr1oq3c5IUuBlalQ+udNNSbNb6bcnPj/cCyZvI7sUuQ+Ah4WLU3usC2Yhj1XNTRS d0m9IU9RyLIDITObPH6OA1V9e850rZbonooDNDOQuwWx6M7w20kBmPl9uK1+0xSfcMBq 2TRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=vJNEMM5J7/Qf1SBLTqXhH7G0om3Wy3P6uvuPWDo0iPY=; b=Wit8hb47V9kREQy9Fi3/Nr+Y48nrL4OR89T2hpYpIXA2P/LsXYDq3dq4n0MR234L4M CaAZ1Yy8wncSSzFyFfqcIrSITxq13P7/1NqjobfTyVPXwCj/kqalP02r4YuqZMJrgN+K 6+LzS4j1F4cUWyXMgbPKGlX5JyA5w71sfEdLv8CmPVy5Upx5hhpIKT/djTbmApenm/Yp aEKxlv4rF2yH8cSV6QjkCHP6w7OdtIJledPZ6wlDCBfzRbLCCeWwaZ0SE9f/IxWTb8WP addgN1vKIxpHgjH8gabnU7lRgKrbM14Jvzzd7qwRW8dw8LJ95tTn6gFBM9uhNzxXxT4y C5yw== X-Gm-Message-State: AOUpUlFciUYDGB9yPlSqj0RgTorkIMnZ+m0VffUH+pqETD43ujtR8GPS DtEv6D0yK0BQXPEocRhCgNA5ll5WWnU= X-Google-Smtp-Source: AAOMgpcKvTSSYEVRMJeMiwFanGuiAAvwrNNmldpOSYaZPw72H0v5PhIQ41OEIUPsPYyZPnDGxEy3uw== X-Received: by 2002:aca:f0a:: with SMTP id 10-v6mr303580oip.183.1532377153856; Mon, 23 Jul 2018 13:19:13 -0700 (PDT) Received: from localhost (76-251-165-188.lightspeed.austtx.sbcglobal.net. [76.251.165.188]) by smtp.gmail.com with ESMTPSA id m62-v6sm26381628oik.30.2018.07.23.13.19.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jul 2018 13:19:12 -0700 (PDT) From: Michael Roth <mdroth@linux.vnet.ibm.com> To: qemu-devel@nongnu.org Date: Mon, 23 Jul 2018 15:16:32 -0500 Message-Id: <20180723201748.25573-24-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> References: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::244 Subject: [Qemu-devel] [PATCH 23/99] console: Avoid segfault in screendump 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> Cc: Michal Privoznik <mprivozn@redhat.com>, qemu-stable@nongnu.org, Gerd Hoffmann <kraxel@redhat.com> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
Patch Round-up for stable 2.12.1, freeze on 2018-07-30
|
expand
|
diff --git a/ui/console.c b/ui/console.c index 3fb2f4e09f..476bf901a4 100644 --- a/ui/console.c +++ b/ui/console.c @@ -370,6 +370,11 @@ void qmp_screendump(const char *filename, bool has_device, const char *device, graphic_hw_update(con); surface = qemu_console_surface(con); + if (!surface) { + error_setg(errp, "no surface"); + return; + } + ppm_save(filename, surface, errp); }