From nobody Sat May 4 15:49:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1611295774; cv=none; d=zohomail.com; s=zohoarc; b=XeRLkW4wIj3VUcbNOZAv8zcOiU0PkDsQguXY7xSlSSHTcuJriBY1ivBk0w94PP7Lf3+hm+A1eF8lDCvMgOF+rmTcUAdJhXP6BM4t45v8+Pu52paQzXmV/R5pGySSx3HCeSsBrn5hP++qu7vvUGO7dQw77m2ibk0C2P1IP1tKZhY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611295774; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=npWm2ufDHo1SLGAKlP/JV2/SYQCR5k4DEE1eplOjovA=; b=NaAkhJfsHzUyHaf28VQiccCaa5yjq4HFEhSL4iCfglNpXhy68VViBtDzQHFwfBSMRSVLCzylen9RY/H+ropLy0reAeYjDW/dPdOBol4uWTwjMvsHgEFybez+Clx1hqkugplKM6i343Kl38dqNRm3ZXHLzm2auK7vyF8brTM+auc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1611295774509483.5221730274807; Thu, 21 Jan 2021 22:09:34 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.72543.130665 (Exim 4.92) (envelope-from ) id 1l2pd1-0007db-0O; Fri, 22 Jan 2021 06:09:03 +0000 Received: by outflank-mailman (output) from mailman id 72543.130665; Fri, 22 Jan 2021 06:09:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l2pd0-0007dU-TV; Fri, 22 Jan 2021 06:09:02 +0000 Received: by outflank-mailman (input) for mailman id 72543; Fri, 22 Jan 2021 06:09:02 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l2pcz-0007cd-UI for xen-devel@lists.xenproject.org; Fri, 22 Jan 2021 06:09:01 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id fc871b13-5dcf-4746-84de-ccb6e7e24edc; Fri, 22 Jan 2021 06:09:00 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id D22B0AB9F; Fri, 22 Jan 2021 06:08:59 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: fc871b13-5dcf-4746-84de-ccb6e7e24edc X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1611295739; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=npWm2ufDHo1SLGAKlP/JV2/SYQCR5k4DEE1eplOjovA=; b=ja3GSPkPxgarCuiko7uJgdrCgJ31N+xV2WooTOnFpMP/h3PH5B29H8D1wTbXwnzwLTngCY PC90Rg6NRHU4v4s5kAyVjbTSdxEltrYo58L5Gt7kpe0ttunDrl5VPvIYiffrnWeIlxWxbG yfvYhWx5IZaVgzRhAhEeW42sijcxjTk= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu , Andrew Cooper Subject: [PATCH] tools/xenstore: fix unsigned < 0 compare in xenstore_control Date: Fri, 22 Jan 2021 07:08:57 +0100 Message-Id: <20210122060857.30273-1-jgross@suse.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) Content-Type: text/plain; charset="utf-8" Commit 7f97193e6aa858df ("tools/xenstore: add live update command to xenstore-control") introduced testing an unsigned value to be less than 0. Fix that. Fixes: 7f97193e6aa858df ("tools/xenstore: add live update command to xenstore-control") Reported-by: Andrew Cooper Signed-off-by: Juergen Gross Acked-by: Andrew Cooper --- tools/xenstore/xenstore_control.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/xenstore/xenstore_control.c b/tools/xenstore/xenstore_co= ntrol.c index 6031f216c7..0c95cf767c 100644 --- a/tools/xenstore/xenstore_control.c +++ b/tools/xenstore/xenstore_control.c @@ -313,8 +313,8 @@ int main(int argc, char **argv) struct xs_handle *xsh; char *par =3D NULL; char *ret; - unsigned int p, len =3D 0; - int rc =3D 0; + unsigned int p; + int rc =3D 0, len =3D 0; =20 if (argc < 2) { fprintf(stderr, "Usage:\n" --=20 2.26.2