From owner-freebsd-bugs Fri Apr 10 08:40:14 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA00565 for freebsd-bugs-outgoing; Fri, 10 Apr 1998 08:40:14 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: (from gnats@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA00518; Fri, 10 Apr 1998 08:40:04 -0700 (PDT) (envelope-from gnats) Received: (from nobody@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA27846; Fri, 10 Apr 1998 08:30:03 -0700 (PDT) (envelope-from nobody) Message-Id: <199804101530.IAA27846@hub.freebsd.org> Date: Fri, 10 Apr 1998 08:30:03 -0700 (PDT) From: fetch@arcadia.spb.ru To: freebsd-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: www-1.0 Subject: kern/6263: Inaccurate allocation of temporary buffer for warning output in ip_input.c Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 6263 >Category: kern >Synopsis: Inaccurate allocation of temporary buffer for warning output in ip_input.c >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Apr 10 08:40:01 PDT 1998 >Last-Modified: >Originator: Andrey Alekseyev >Organization: Arcadia, Inc. >Release: 2.2.2-RELEASE >Environment: FreeBSD muffin.arcadia.spb.ru 2.2.2-RELEASE FreeBSD 2.2.2-RELEASE #0: Thu Apr 9 16:13:27 MSD 1998 fetch@muffin.arcadia.spb.ru:/usr/src/ sys/compile/MUFFIN_IPFIL i386 >Description: I thought it would be useful to point to some inaccuracy in netinet/ip_input.c. When handling ip source routing, if not ip.sourceroute option is set a warning is written to 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. >How-To-Repeat: >Fix: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message