From nobody Wed Oct 22 16:00:19 2025 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7AC0348462 for ; Tue, 21 Oct 2025 17:22:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761067331; cv=none; b=i2PtRm74v7QS9a0OkBrIxPyZgkYwTsb43FKUUHpK6ZTPvg1hgyfbZR12JlFezKyh5E5r3DeV7XFaD9CpVX8d6PMBzqXsgH2sDPin7HwIB40S6q84PW7bn1vB7cvTCx1/XL/MUq27pDb47Dy+WF1C6yq0PH4fsvikP56Hs5apP7o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761067331; c=relaxed/simple; bh=gFqJdj80h/be0aG5qfr/YoS0OUa75SO1vxFrGipVgNI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=uemfdRtAXLceCXpdg1ByxtxnPueU38VC9drMqP8PGC2F++W7IsW7k+hFyG7uOBSuojrLfe66mi9tqP6zyX5saMJNfZqAaaON4qRWMOt6Q7JegGBIBLquEFKkqLoosAmkIZy4AXCwZF1AEAfTgMxUXfi4UyQUh0Aekx6326mOv9Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ssn.edu.in; spf=pass smtp.mailfrom=ssn.edu.in; dkim=pass (1024-bit key) header.d=ssn.edu.in header.i=@ssn.edu.in header.b=BqcxruLb; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ssn.edu.in Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ssn.edu.in Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ssn.edu.in header.i=@ssn.edu.in header.b="BqcxruLb" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-290b48e09a7so69763275ad.0 for ; Tue, 21 Oct 2025 10:22:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ssn.edu.in; s=ssn; t=1761067326; x=1761672126; darn=vger.kernel.org; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=GwdpC/TjTPjM/W/Yn9o7f1GDYTCJVyhJfNsXik8groI=; b=BqcxruLbipEXFt5MX+uWEIAFmmUtCnb6HYAYI/ez7cmKd0sLCq1fczysoufW9rmjHJ sZE2MkNziFgyAJI5j2SIWZd2W5bxy1LAY01Em6UjnrW1WGkf7hF9TEdxslQ32qos6kFC ilLavO7/K8MG1zAG4SK/WDjJrtsCP1L6RQ1t4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761067326; x=1761672126; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=GwdpC/TjTPjM/W/Yn9o7f1GDYTCJVyhJfNsXik8groI=; b=xDP4b5Pgq67rvjbKS8RNNL/Q1+ZCymJW+GqpcnBcFtvZHM7qzVsRb7+pNe+dHRkd9W UON6Fl9V2Z8izQ9FRbpqaxKapcysEuv91uFleHejFjit6KjQoSculeVsSbTZrH+Bek0p LkIAaD7YSdmc/FBYMBl0uQ2CZx4vDFYc6jkXdbeL8mQN5vCMdyBcgO90MagglWss/cfC TqS2t9q0M8AF+PZJXXfIShIhPoLqmJLWMEVrDTxeVSuhLke8AjNPJrLp79a8Jo/0Kw3I CRv6DyHewDWgjR8jhLOkaCFZFIG++maUqpiOzzbqT2BUVKzClzbSguY8Xk7c8EmwnNkH tHcw== X-Gm-Message-State: AOJu0YyXS52O5siBwiDyzSFhtVZfZjv8QSnQOqs80FcEBX3FPoef/er3 IkOLB3F9460EPX/3IIK1+u1moQT0fbT9q3uqhCYrdxAbbiTg6f3SES9ddpb12BEUdzDEItF2lCs B6eQbc2YZH/7bOEZCu5sz9Zgyq1S4HTRM9tj7AMsahWnj73ogkoU/iXqdq0yj8Tf56Ph1en55KC E= X-Gm-Gg: ASbGncvbBVhbzw8GrjJzvaiRgi7gyaEMZ2x1nM4KgRK4Vxivv/JiRMKeHlRuICqxOXo UuafxLo80dqqju13YKOm21F+SxpM/FO7GWVF+yKhvtE9qNFXcNfN0SXng3Xz8cCrGCTFdt3OeLm dVkt3y3Xxx2cn2RdYfHHGqaWEHYR74JA0INoaazPG1WzbQpyHr2NVNyM4XgM+v/9eUZ/wodgZpW RAWMpgYUHx2oFfYNwcegQiNHPzCFvo9hBcO7yvjjd96hm9yry8CXQCS0d9YwHI1hHF9p+FtFC4k Hs7JdKaUoQXh4T/6HByy4A+lrOI/NOTwrtvW8Bkxr+Xiz2jqX8oMEQnQLt8eQLaKFRK6sHORxy3 JPDcB5u0Mp6I5xpaR0pKPg+XrrwocueaM2BFu+0s3TwGJUP5je+WAdBtWp4DrzBQJmeKT0JiASV NYeQuiCaF3O2VkIXmHM/VutscWREXqI3b8rkQ8fsXbUjZX1v5UWHUpBZHK/DBRaLJTXcXTBs7dy Q25V4QWDSbFyeo= X-Google-Smtp-Source: AGHT+IH2KEXVpH8xLJ6eWL13PAnBfQ6UqZgOoampku+eFQDoOCWIKsTjVH8w7CmoPtCucRqlZGaVIw== X-Received: by 2002:a17:902:ce0e:b0:292:324e:24bc with SMTP id d9443c01a7336-292324e26damr195111515ad.16.1761067325861; Tue, 21 Oct 2025 10:22:05 -0700 (PDT) Received: from biancaa-HP-Pavilion-Laptop-15-eg2xxx.. ([2406:7400:1c3:33f3:d5f3:33d1:a1e0:46bc]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2924721980bsm114249425ad.110.2025.10.21.10.22.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Oct 2025 10:22:05 -0700 (PDT) From: Biancaa Ramesh To: linux-kernel@vger.kernel.org Cc: Biancaa Ramesh Subject: [PATCH] set initial length of string to 0 instead of 64 Date: Tue, 21 Oct 2025 22:51:59 +0530 Message-ID: <20251021172159.47314-1-biancaa2210329@ssn.edu.in> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Signed-off-by: Biancaa Ramesh --- scripts/kconfig/util.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c index 176ec03bb3f0..f55e3ce496e1 100644 --- a/scripts/kconfig/util.c +++ b/scripts/kconfig/util.c @@ -64,13 +64,14 @@ const char *file_lookup(const char *name) struct gstr str_new(void) { struct gstr gs; - gs.s =3D xmalloc(sizeof(char) * 64); - gs.len =3D 64; + gs.s =3D xmalloc(64); // allocate buffer + gs.len =3D 0; // string is empty gs.max_width =3D 0; - strscpy(gs.s, "\0"); + gs.s[0] =3D '\0'; // initialize as empty string return gs; } =20 + /* Free storage for growable string */ void str_free(struct gstr *gs) { --=20 2.43.0 --=20 ::DISCLAIMER:: --------------------------------------------------------------------- The=20 contents of this e-mail and any attachment(s) are confidential and intended=20 for the named recipient(s) only. Views or opinions, if any, presented in=20 this email are solely those of the author and may not necessarily reflect=20 the views or opinions of SSN Institutions (SSN) or its affiliates. Any form=20 of reproduction, dissemination, copying, disclosure, modification,=20 distribution and / or publication of this message without the prior written=20 consent of authorized representative of SSN is strictly prohibited. If you=20 have received this email in error please delete it and notify the sender=20 immediately. --------------------------------------------------------------------- Header of this mail should have a valid DKIM signature for the domain=20 ssn.edu.in