Commit cf9b94f8 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

irda: off by one

This is an off by one.  We would go past the end when we NUL terminate
the "value" string at end of the function.  The "value" buffer is
allocated in irlan_client_parse_response() or

Signed-off-by: default avatarDan Carpenter <>
Signed-off-by: default avatarDavid S. Miller <>
parent 89b12fab
......@@ -1102,7 +1102,7 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len)
memcpy(&val_len, buf+n, 2); /* To avoid alignment problems */
le16_to_cpus(&val_len); n+=2;
if (val_len > 1016) {
if (val_len >= 1016) {
IRDA_DEBUG(2, "%s(), parameter length to long\n", __func__ );
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment