diff options
author | David Binderman <dcb314@hotmail.com> | 2006-02-09 19:59:48 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-02-09 19:59:48 -0500 |
commit | 80ba250e59ced808a8c9b79560938bbe4509c0a7 (patch) | |
tree | 017c64acb3a5d5a43a495ea1e58b2dc270e2441e /net/irda | |
parent | d93077fb0e7cb9d4f4094a649501d840c55fdc8b (diff) |
[IRDA]: out of range array access
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>
Diffstat (limited to 'net/irda')
-rw-r--r-- | net/irda/irnet/irnet_irda.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/irda/irnet/irnet_irda.c b/net/irda/irnet/irnet_irda.c index 07ec326c71f5..f65c7a83bc5c 100644 --- a/net/irda/irnet/irnet_irda.c +++ b/net/irda/irnet/irnet_irda.c | |||
@@ -696,7 +696,7 @@ irnet_daddr_to_dname(irnet_socket * self) | |||
696 | { | 696 | { |
697 | /* Yes !!! Get it.. */ | 697 | /* Yes !!! Get it.. */ |
698 | strlcpy(self->rname, discoveries[i].info, sizeof(self->rname)); | 698 | strlcpy(self->rname, discoveries[i].info, sizeof(self->rname)); |
699 | self->rname[NICKNAME_MAX_LEN + 1] = '\0'; | 699 | self->rname[sizeof(self->rname) - 1] = '\0'; |
700 | DEBUG(IRDA_SERV_INFO, "Device 0x%08x is in fact ``%s''.\n", | 700 | DEBUG(IRDA_SERV_INFO, "Device 0x%08x is in fact ``%s''.\n", |
701 | self->daddr, self->rname); | 701 | self->daddr, self->rname); |
702 | kfree(discoveries); | 702 | kfree(discoveries); |