* [patch 2/2] Staging: crystalhd: don't waste the last char of buffer
@ 2011-03-14 9:35 Dan Carpenter
2011-03-14 20:03 ` [patch 2/2] Staging: crystalhd: don't waste the last char of Jarod Wilson
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-03-14 9:35 UTC (permalink / raw)
To: kernel-janitors
pinfo->name is a 32 char buffer. In the original code, the last char
wasn't fully utilized.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c b/drivers/staging/crystalhd/crystalhd_lnx.c
index 4197111..7e0c199 100644
--- a/drivers/staging/crystalhd/crystalhd_lnx.c
+++ b/drivers/staging/crystalhd/crystalhd_lnx.c
@@ -562,7 +562,7 @@ static int __devinit chd_dec_pci_probe(struct pci_dev *pdev,
goto err;
}
- snprintf(pinfo->name, 31, "crystalhd_pci_e:%d:%d:%d",
+ snprintf(pinfo->name, sizeof(pinfo->name), "crystalhd_pci_e:%d:%d:%d",
pdev->bus->number, PCI_SLOT(pdev->devfn),
PCI_FUNC(pdev->devfn));
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch 2/2] Staging: crystalhd: don't waste the last char of
2011-03-14 9:35 [patch 2/2] Staging: crystalhd: don't waste the last char of buffer Dan Carpenter
@ 2011-03-14 20:03 ` Jarod Wilson
0 siblings, 0 replies; 2+ messages in thread
From: Jarod Wilson @ 2011-03-14 20:03 UTC (permalink / raw)
To: kernel-janitors
On Mon, Mar 14, 2011 at 12:35:31PM +0300, Dan Carpenter wrote:
> pinfo->name is a 32 char buffer. In the original code, the last char
> wasn't fully utilized.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
--
Jarod Wilson
jarod@redhat.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-14 20:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-14 9:35 [patch 2/2] Staging: crystalhd: don't waste the last char of buffer Dan Carpenter
2011-03-14 20:03 ` [patch 2/2] Staging: crystalhd: don't waste the last char of Jarod Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox