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:	Tue, 9 Sep 2008 08:38:31 -0600
From:	Matthew Wilcox <matthew@....cx>
To:	Alex Chiang <achiang@...com>
Cc:	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
	jbarnes@...tuousgeek.org, kristen.c.accardi@...el.com,
	kaneshige.kenji@...fujitsu.com
Subject: Re: [PATCH v2 04/13] PCI: acpiphp: remove 'name' parameter

On Tue, Sep 09, 2008 at 04:00:22AM -0600, Alex Chiang wrote:
> We do not need to manage our own name parameter, especially since
> the PCI core can change it on our behalf, in the case of duplicate
> slot names.

Looks good, just a question ...

>  	acpiphp_slot->slot = slot;
> -	snprintf(slot->name, sizeof(slot->name), "%u", slot->acpi_slot->sun);
> +	scnprintf(name, SLOT_NAME_SIZE, "%u", slot->acpi_slot->sun);
>  

What's the difference between snprintf and scnprintf?

And why were we bothering to use snprintf anyway?  For when we fall into a
parallel universe where a u32 can have more than twenty digits?

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ