Skip to content

Commit

Permalink
[IRDA]: out of range array access
Browse files Browse the repository at this point in the history
This patch fixes an out of range array access in irnet_irda.c.

Author: David Binderman <dcb314@hotmail.com>
Signed-off-by: Samuel Ortiz <samuel.ortiz@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David Binderman authored and David S. Miller committed Feb 10, 2006
1 parent d93077f commit 80ba250
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/irda/irnet/irnet_irda.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ irnet_daddr_to_dname(irnet_socket * self)
{
/* Yes !!! Get it.. */
strlcpy(self->rname, discoveries[i].info, sizeof(self->rname));
self->rname[NICKNAME_MAX_LEN + 1] = '\0';
self->rname[sizeof(self->rname) - 1] = '\0';
DEBUG(IRDA_SERV_INFO, "Device 0x%08x is in fact ``%s''.\n",
self->daddr, self->rname);
kfree(discoveries);
Expand Down

0 comments on commit 80ba250

Please sign in to comment.