Re: [hackers] [ubase][PATCH] pidof: fix -o option being applied without -o flag (and correct exit code)

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.net>
Date: Tue, 30 Dec 2025 12:38:37 +0100

Hi,

On Wed, Dec 17, 2025 at 12:39:17PM +0100, runitclean wrote:
> The omit PID list was parsed even when -o was not specified.
> In that case, arg was left uninitialized, so passing it to strtok()
> resulted in undefined behavior and could lead to a segfault.
>
> Only parse omit PIDs when -o is set.
>
> also fix the exit status to return 1 when no matching PID is found
>

Applied with minor formating changes in the commit message.

Thank you!
Received on Tue Dec 30 2025 - 12:38:37 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 30 2025 - 12:48:34 CET