Message ID | 1311780044-21804-2-git-send-email-apw@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/net/irda/iriap.c b/net/irda/iriap.c index a86a5d8..a765d5f 100644 --- a/net/irda/iriap.c +++ b/net/irda/iriap.c @@ -652,10 +652,16 @@ static void iriap_getvaluebyclass_indication(struct iriap_cb *self, n = 1; name_len = fp[n++]; + + IRDA_ASSERT(name_len < IAS_MAX_CLASSNAME + 1, return;); + memcpy(name, fp+n, name_len); n+=name_len; name[name_len] = '\0'; attr_len = fp[n++]; + + IRDA_ASSERT(attr_len < IAS_MAX_ATTRIBNAME + 1, return;); + memcpy(attr, fp+n, attr_len); n+=attr_len; attr[attr_len] = '\0';