From nobody Mon Feb 9 05:59:40 2026 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; 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 Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1686416918478745.5995793814224; Sat, 10 Jun 2023 10:08:38 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.546553.853513 (Exim 4.92) (envelope-from ) id 1q824J-000853-8C; Sat, 10 Jun 2023 17:08:03 +0000 Received: by outflank-mailman (output) from mailman id 546553.853513; Sat, 10 Jun 2023 17:08:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q824J-00084w-5T; Sat, 10 Jun 2023 17:08:03 +0000 Received: by outflank-mailman (input) for mailman id 546553; Sat, 10 Jun 2023 17:08:01 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q824H-0007pL-SV for xen-devel@lists.xenproject.org; Sat, 10 Jun 2023 17:08:01 +0000 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 59f8d0b9-07b1-11ee-8611-37d641c3527e; Sat, 10 Jun 2023 19:08:00 +0200 (CEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 555E85C00D2; Sat, 10 Jun 2023 13:07:59 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 10 Jun 2023 13:07:59 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 10 Jun 2023 13:07:57 -0400 (EDT) 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: 59f8d0b9-07b1-11ee-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1686416879; x=1686503279; bh=7Jo4c9QtvH tlbToAB55IunRxRJMuKNem21WfUtrWYf0=; b=R4G872AhYLcgiVT64bv01uWxyk UTwIQzhAviwtIXFLPZXZvAExiP7zCJC1L2DwDvix0Y/EASfsycXqZVWDZYv/W4KD wa1afVEZ+1fTLXff2BL4wiL1DmJUjneB6egjzzThpU7oSwT+n5VRD1uhE3af5Vfy vn3SNtiLfO9TOfggoGNENKVz4LorILzprI6jhwRDoyledV1PZ4Z+7BRY315l64et DJoAyfYhYPgCJnu+1QxzEKf4KKCEh/oPuFIgP+1RdfOEv9whP+j9vPOvziuk8757 4sBfrpQU0TpgjfT9CRKmXccMjv+U4IhX4fbkDzlw5y1ICiUdvgEkDaTKyjnA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1686416879; x= 1686503279; bh=7Jo4c9QtvHtlbToAB55IunRxRJMuKNem21WfUtrWYf0=; b=X oovcJPuoEjGfvUgRl8xODTUTUISTuoR53DYOjfKU+/3BDsVh9AoXonh+6CGk2Bx7 V6rmqF7vS8zoo1Tq/Mq+uSoXdTEUeB0XrE2Z81DFUu+eZzgi4O6WstMXfs6vCds5 a3tvdw7mykCNksP4Xqmjr1YqdJZIrni8VQVutX3OVk46TMhnc1+4v2rWIJW82eAL HJk7AWeud3HyBNvLmjin43Ig0qw3YGZb7qhEJHmFsRUDnYKcaRYlV3Lz9PH7ZGKC jHdNH/JiBTewLNml7VzaJoNy/fFJAOtQt80QOMes9VM8/dV+0Vw2NN2wp34Ht7ae uQRe+sBFu1chU7B7k9vqg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedutddgudduudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeffvghm ihcuofgrrhhivgcuqfgsvghnohhurhcuoeguvghmihesihhnvhhishhisghlvghthhhinh hgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeekveekveegudffgffgleekudeu keetlefgveelhfehuedtfedvgfeklefhtefgfeenucffohhmrghinhepkhgvrhhnvghlrd horhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhep uggvmhhisehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomh X-ME-Proxy: Feedback-ID: iac594737:Fastmail From: Demi Marie Obenour To: Hans de Goede , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Lee Jones , Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes Cc: Demi Marie Obenour , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, Christoph Hellwig Subject: [PATCH v2 2/3] vsscanf(): do not skip spaces Date: Sat, 10 Jun 2023 13:07:42 -0400 Message-Id: <20230610170743.2510-3-demi@invisiblethingslab.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230610170743.2510-1-demi@invisiblethingslab.com> References: <20230610170743.2510-1-demi@invisiblethingslab.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1686416919795100001 Content-Type: text/plain; charset="utf-8" Passing spaces before e.g. an integer is usually not intended. This was suggested by Christoph in https://lore.kernel.org/lkml/ZIQrohcizoj4bZWx@infradead.org/. Suggested-by: Christoph Hellwig Signed-off-by: Demi Marie Obenour --- lib/vsprintf.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 8caccdcda0a2b470cda70c9b3837de37207eb512..d2d795d1aff0fd5cc50fb65ffb0= 67067ab9f0dc6 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -3547,8 +3547,6 @@ int vsscanf(const char *buf, const char *fmt, va_list= args) char *s =3D (char *)va_arg(args, char *); if (field_width =3D=3D -1) field_width =3D SHRT_MAX; - /* first, skip leading white space in buffer */ - str =3D skip_spaces(str); =20 /* now copy until next white space */ while (*str && !isspace(*str) && field_width--) @@ -3635,11 +3633,7 @@ int vsscanf(const char *buf, const char *fmt, va_lis= t args) return num; } =20 - /* have some sort of integer conversion. - * first, skip white space in buffer. - */ - str =3D skip_spaces(str); - + /* have some sort of integer conversion. */ digit =3D *str; if (is_sign && digit =3D=3D '-') { if (field_width =3D=3D 1) --=20 Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab