diff options
author | Dan Carpenter <error27@gmail.com> | 2010-07-10 04:53:38 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-12 16:05:32 -0400 |
commit | 4c92831d99827971cf2854cfa7f884213099428f (patch) | |
tree | fafce6b1a9c082952a91659d18e7f7d5970dd45c | |
parent | 72e93e9161a917017f6c3cac216d813088ec2d1f (diff) |
prism54: call BUG_ON() earlier
This test is off by one because strlen() doesn't include the NULL
terminator.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/prism54/isl_ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c index 236e37526d07..2e656bb7e14e 100644 --- a/drivers/net/wireless/prism54/isl_ioctl.c +++ b/drivers/net/wireless/prism54/isl_ioctl.c | |||
@@ -2067,7 +2067,7 @@ send_simple_event(islpci_private *priv, const char *str) | |||
2067 | memptr = kmalloc(IW_CUSTOM_MAX, GFP_KERNEL); | 2067 | memptr = kmalloc(IW_CUSTOM_MAX, GFP_KERNEL); |
2068 | if (!memptr) | 2068 | if (!memptr) |
2069 | return; | 2069 | return; |
2070 | BUG_ON(n > IW_CUSTOM_MAX); | 2070 | BUG_ON(n >= IW_CUSTOM_MAX); |
2071 | wrqu.data.pointer = memptr; | 2071 | wrqu.data.pointer = memptr; |
2072 | wrqu.data.length = n; | 2072 | wrqu.data.length = n; |
2073 | strcpy(memptr, str); | 2073 | strcpy(memptr, str); |