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]
Date:   Sat, 24 Apr 2021 16:37:52 -0400
From:   "Valdis Klētnieks" <valdis.kletnieks@...edu>
To:     Anupama K Patil <anupamakpatil123@...il.com>
Cc:     Jaroslav Kysela <perex@...ex.cz>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
        skhan@...uxfoundation.org, bkkarthik@...u.pes.edu,
        gregkh@...uxfoundation.org, kernelnewbies@...nelnewbies.org
Subject: Re: [PATCH] drivers: pnp: proc.c: Handle errors while attaching devices

On Sun, 25 Apr 2021 01:13:01 +0530, Anupama K Patil said:
> Changed sprintf() to the kernel-space function scnprintf() as it returns
> the actual number of bytes written.

> +	if (!bus->procdir) {
> +		scnprintf(name, 16, "%02x", bus->number);

> +	scnprintf(name, 16, "%02x", dev->number);

Why do this when you don't *use* the number of bytes written, but instead ignore
the value returned?

For bonus points:  Given the %02x format, under what conditions can it
return a value other than 2?


Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ