Date: Fri, 10 Apr 1998 09:10:01 -0700 (PDT) From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> To: freebsd-bugs Subject: kern/6263: Inaccurate allocation of temporary buffer for warning output in ip_input.c Message-ID: <199804101610.JAA06214@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/6263; it has been noted by GNATS. From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> To: fetch@arcadia.spb.ru Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: kern/6263: Inaccurate allocation of temporary buffer for warning output in ip_input.c Date: Fri, 10 Apr 1998 11:57:59 -0400 (EDT) <<On Fri, 10 Apr 1998 08:30:03 -0700 (PDT), fetch@arcadia.spb.ru said: > log "attempted source route from .. to ..". A temporary buffer > allocated as buf[4*sizeof "123"] is used to print destination ip and > is filled as following strcpy(buf, inet_ntoa(ip->ip_dst));. I think using sizeof "123." would be much more correct in this case. No, that would allocate a buffer four bytes longer than needed. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804101610.JAA06214>