Skip to content

Commit

Permalink
USB: musb: Fix array index out of bounds issue
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Maulik Mankad authored and Greg Kroah-Hartman committed Dec 23, 2009
1 parent 0abdc36 commit 0ea52ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/musb/musb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,7 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb)
#endif
u8 reg;
char *type;
char aInfo[78], aRevision[32], aDate[12];
char aInfo[90], aRevision[32], aDate[12];
void __iomem *mbase = musb->mregs;
int status = 0;
int i;
Expand Down

0 comments on commit 0ea52ff

Please sign in to comment.