public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: buermarc <buermarc@googlemail.com>
To: ps.report@gmx.net
Cc: buermarc@googlemail.com, elias.rw2@gmail.com,
	joel.granados@kernel.org, kees@kernel.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH ] sysctl: fix uninitialized variable in proc_do_large_bitmap
Date: Tue, 17 Mar 2026 22:32:05 +0100	[thread overview]
Message-ID: <20260317213205.13681-1-buermarc@googlemail.com> (raw)
In-Reply-To: <20260315152635.4c20c6f0@pc-1>

From: Marc Buerg <buermarc@googlemail.com>

Hello Peter,

c will be overwritten by the previous proc_get_long() calls but that
will not be a problem. We only check c again if we had another trailing
char in either tr_a or tr_b[] = { ',', '\n', 0 }, minus '-'. If we find
a first '-' we will only reach the check again after hitting a trailing
char in tr_b. This ensures c must not be '-' before we might encounter a
new '-'. Meaning c should not contain a problematic value in future
iterations, but only in the first.

I agree: checking for left, as you proposed, should be done. I'll drop
setting c to zero and create a new patch which checks left.

Kind Regards,
Marc

      reply	other threads:[~2026-03-17 21:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12 15:42 [PATCH] sysctl: fix uninitialized variable in proc_do_large_bitmap Marc Buerg
2026-03-13 11:17 ` Peter Seiderer
2026-03-14  9:37   ` [PATCH ] " Marc Buerg
2026-03-15 14:26     ` Peter Seiderer
2026-03-17 21:32       ` buermarc [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260317213205.13681-1-buermarc@googlemail.com \
    --to=buermarc@googlemail.com \
    --cc=elias.rw2@gmail.com \
    --cc=joel.granados@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ps.report@gmx.net \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox