projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e70ab97
)
irda: small read beyond end of array in debug code
author
Dan Carpenter
<
[email protected]
>
Tue, 26 Feb 2013 19:15:02 +0000
(19:15 +0000)
committer
David S. Miller
<
[email protected]
>
Wed, 27 Feb 2013 18:10:35 +0000
(13:10 -0500)
charset comes from skb->data. It's a number in the 0-255 range.
If we have debugging turned on then this could cause a read beyond
the end of the array.
Signed-off-by: Dan Carpenter <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/irda/iriap.c
patch
|
blob
|
history
diff --git
a/net/irda/iriap.c
b/net/irda/iriap.c
index e71e85ba2bf1c180b2038d62021283ddf7982b07..29340a9a6fb9937f9bc848ffda5c49c51cca47ee 100644
(file)
--- a/
net/irda/iriap.c
+++ b/
net/irda/iriap.c
@@
-495,8
+495,11
@@
static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
/* case CS_ISO_8859_9: */
/* case CS_UNICODE: */
default:
- IRDA_DEBUG(0, "%s(), charset %s, not supported\n",
- __func__, ias_charset_types[charset]);
+ IRDA_DEBUG(0, "%s(), charset [%d] %s, not supported\n",
+ __func__, charset,
+ charset < ARRAY_SIZE(ias_charset_types) ?
+ ias_charset_types[charset] :
+ "(unknown)");
/* Aborting, close connection! */
iriap_disconnect_request(self);