From: David Binderman Date: Fri, 10 Feb 2006 00:59:48 +0000 (-0800) Subject: [IRDA]: out of range array access X-Git-Tag: v2.6.16-rc3~44^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80ba250e59ced808a8c9b79560938bbe4509c0a7;p=linux-2.6 [IRDA]: out of range array access This patch fixes an out of range array access in irnet_irda.c. Author: David Binderman Signed-off-by: Samuel Ortiz Signed-off-by: David S. Miller --- diff --git a/net/irda/irnet/irnet_irda.c b/net/irda/irnet/irnet_irda.c index 07ec326c71..f65c7a83bc 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) { /* 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);