lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87bjilis01.fsf@yellow.woof>
Date: Thu, 22 Jan 2026 16:31:10 +0100
From: Nam Cao <namcao@...utronix.de>
To: Wander Lairson Costa <wander@...hat.com>, Steven Rostedt
 <rostedt@...dmis.org>, Gabriele Monaco <gmonaco@...hat.com>, Wander
 Lairson Costa <wander@...hat.com>, open list
 <linux-kernel@...r.kernel.org>, "open list:RUNTIME VERIFICATION (RV)"
 <linux-trace-kernel@...r.kernel.org>
Subject: Re: [PATCH 17/26] rv/rvgen: fix possibly unbound variable in ltl2k

Wander Lairson Costa <wander@...hat.com> writes:

> Initialize loop variable `i` before the for loop in abbreviate_atoms
> function to fix pyright static type checker error. The previous code
> left `i` potentially unbound in edge cases where the range could be
> empty, though this would not occur in practice since the loop always
> executes at least once with the given range parameters.
>
> The initialization to zero ensures that `i` has a defined value before
> entering the loop scope, satisfying static analysis requirements
> while preserving the existing logic. The for loop immediately assigns
> i to the first value from the range, so the initialization value is
> never actually used in normal execution paths.
>
> This change resolves the pyright reportPossiblyUnbound error without
> altering the function's behavior or performance characteristics.
>
> Signed-off-by: Wander Lairson Costa <wander@...hat.com>

I understand this is just to suppress a false warning, not fixing real
problem.

Reviewed-by: Nam Cao <namcao@...utronix.de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ