diff options
author | Maulik Mankad <x0082077@ti.com> | 2009-12-22 05:49:53 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-23 14:34:19 -0500 |
commit | 0ea52ff44f7a30781881ca2debf35e47b2676171 (patch) | |
tree | b0174dab46114128872408535c733aab14adec4a | |
parent | 0abdc36f066ae20521b8c8d306725dd59a0d50aa (diff) |
USB: musb: Fix array index out of bounds issue
This patch fixes the below array index out of bounds issue.
Buffer overflow, array index of 'aInfo' may be out of
bounds. Array 'aInfo' of size 78 may use index value(s) 6..84
The data stored in 'aInfo' array exceeds the array size of 78.
This patch increases the size of this array to hold the string
correctly without any memory corruption.
This issue was reported by Klockwork tool.
Signed-off-by: Maulik Mankad <x0082077@ti.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/musb/musb_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 24ff09754e0c..5eb9318cff77 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -1319,7 +1319,7 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb) | |||
1319 | #endif | 1319 | #endif |
1320 | u8 reg; | 1320 | u8 reg; |
1321 | char *type; | 1321 | char *type; |
1322 | char aInfo[78], aRevision[32], aDate[12]; | 1322 | char aInfo[90], aRevision[32], aDate[12]; |
1323 | void __iomem *mbase = musb->mregs; | 1323 | void __iomem *mbase = musb->mregs; |
1324 | int status = 0; | 1324 | int status = 0; |
1325 | int i; | 1325 | int i; |