From patchwork Fri May 23 11:24:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 351808 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D0D3114009C for ; Fri, 23 May 2014 21:27:18 +1000 (EST) Received: from localhost ([::1]:42363 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wnnd6-0006oY-HF for incoming@patchwork.ozlabs.org; Fri, 23 May 2014 07:27:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wnnam-000381-LH for qemu-devel@nongnu.org; Fri, 23 May 2014 07:24:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wnnaf-0000cY-Lj for qemu-devel@nongnu.org; Fri, 23 May 2014 07:24:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61903) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wnnaf-0000cP-Di for qemu-devel@nongnu.org; Fri, 23 May 2014 07:24:45 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4NBOi60021609 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 May 2014 07:24:44 -0400 Received: from blackfin.pond.sub.org (ovpn-116-33.ams2.redhat.com [10.36.116.33]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s4NBOhep017342 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 23 May 2014 07:24:44 -0400 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 006CC305CAB4; Fri, 23 May 2014 13:24:39 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Fri, 23 May 2014 13:24:38 +0200 Message-Id: <1400844279-1685-7-git-send-email-armbru@redhat.com> In-Reply-To: <1400844279-1685-1-git-send-email-armbru@redhat.com> References: <1400844279-1685-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: mjt@tls.msk.ru, alevy@redhat.com Subject: [Qemu-devel] [PATCH v2 6/7] libcacard/vcard_emul_nss: Assert vreaderOpt isn't null X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org It's not locally obvious, and Coverity can't see it either. Signed-off-by: Markus Armbruster Reviewed-by: Alon Levy --- libcacard/vcard_emul_nss.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_emul_nss.c index 2048917..4f55e44 100644 --- a/libcacard/vcard_emul_nss.c +++ b/libcacard/vcard_emul_nss.c @@ -1181,6 +1181,7 @@ vcard_emul_options(const char *args) vreaderOpt = g_renew(VirtualReaderOptions, opts->vreader, reader_count); } + assert(vreaderOpt); opts->vreader = vreaderOpt; vreaderOpt = &vreaderOpt[opts->vreader_count]; vreaderOpt->name = g_strndup(name, name_length);