diff mbox

[1/6] OMAP: mmc-twl4030 fix name buffer length

Message ID 20090310093302.16889.4535.sendpatchset@ahunter-laptop
State Accepted
Commit 9ed678812ff0a8c42884ce5179b0ac34e3d0c995
Headers show

Commit Message

Adrian Hunter March 10, 2009, 9:33 a.m. UTC
From 60238a3a80b5be3e1843a049b39eabf729c315aa Mon Sep 17 00:00:00 2001
From: Adrian Hunter <adrian.hunter@nokia.com>
Date: Thu, 22 Jan 2009 17:58:04 +0200
Subject: [PATCH] OMAP: mmc-twl4030 fix name buffer length

Add 1 to buffer length for null terminator.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
---
 arch/arm/mach-omap2/mmc-twl4030.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

David Brownell March 10, 2009, 5:28 p.m. UTC | #1
On Tuesday 10 March 2009, Adrian Hunter wrote:
> >From 60238a3a80b5be3e1843a049b39eabf729c315aa Mon Sep 17 00:00:00 2001
> From: Adrian Hunter <adrian.hunter@nokia.com>
> Date: Thu, 22 Jan 2009 17:58:04 +0200
> Subject: [PATCH] OMAP: mmc-twl4030 fix name buffer length
> 
> Add 1 to buffer length for null terminator.
> 
> Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>

Acked-by: David Brownell <dbrownell@users.sourceforge.net>

An endless off-by-one bug ...


> ---
>  arch/arm/mach-omap2/mmc-twl4030.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c
> index 33e5b9b..aeaab5a 100644
> --- a/arch/arm/mach-omap2/mmc-twl4030.c
> +++ b/arch/arm/mach-omap2/mmc-twl4030.c
> @@ -61,7 +61,7 @@ static struct twl_mmc_controller {
>  	struct omap_mmc_platform_data	*mmc;
>  	u8		twl_vmmc_dev_grp;
>  	u8		twl_mmc_dedicated;
> -	char		name[HSMMC_NAME_LEN];
> +	char		name[HSMMC_NAME_LEN + 1];
>  } hsmmc[OMAP34XX_NR_MMC] = {
>  	{
>  		.twl_vmmc_dev_grp		= VMMC1_DEV_GRP,
> -- 
> 1.5.6.3
> 
> 



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tony Lindgren March 10, 2009, 7:17 p.m. UTC | #2
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Commit: 9ed678812ff0a8c42884ce5179b0ac34e3d0c995

PatchWorks
http://patchwork.kernel.org/patch/10840/

Git
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=9ed678812ff0a8c42884ce5179b0ac34e3d0c995


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c
index 33e5b9b..aeaab5a 100644
--- a/arch/arm/mach-omap2/mmc-twl4030.c
+++ b/arch/arm/mach-omap2/mmc-twl4030.c
@@ -61,7 +61,7 @@  static struct twl_mmc_controller {
 	struct omap_mmc_platform_data	*mmc;
 	u8		twl_vmmc_dev_grp;
 	u8		twl_mmc_dedicated;
-	char		name[HSMMC_NAME_LEN];
+	char		name[HSMMC_NAME_LEN + 1];
 } hsmmc[OMAP34XX_NR_MMC] = {
 	{
 		.twl_vmmc_dev_grp		= VMMC1_DEV_GRP,