From owner-freebsd-current@FreeBSD.ORG Sat Apr 14 16:20:07 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B3CF216A402; Sat, 14 Apr 2007 16:20:07 +0000 (UTC) (envelope-from maxim@macomnet.ru) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) by mx1.freebsd.org (Postfix) with ESMTP id 283F013C458; Sat, 14 Apr 2007 16:20:06 +0000 (UTC) (envelope-from maxim@macomnet.ru) Received: from localhost (localhost.int.ru [127.0.0.1] (may be forged)) by mp2.macomnet.net (8.13.7/8.13.8) with ESMTP id l3EG9eBu087520; Sat, 14 Apr 2007 20:09:41 +0400 (MSD) (envelope-from maxim@macomnet.ru) Date: Sat, 14 Apr 2007 20:09:40 +0400 (MSD) From: Maxim Konovalov To: Roman Divacky In-Reply-To: <20070414154242.GA82355@freebsd.org> Message-ID: <20070414200928.F9990@mp2.macomnet.net> References: <20070414154242.GA82355@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: current@freebsd.org Subject: Re: off-by-one error in sbin/atm X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Apr 2007 16:20:07 -0000 On Sat, 14 Apr 2007, 17:42+0200, Roman Divacky wrote: > hi > > in /usr/src/sbin/atm/atmconfig/diag.c on line 871 there's > off-by-one error. array of size IFNAMSIZ is being written > on IFNAMSIZ, ie. one byte after the array. > > this code > ifr.ifr_name[IFNAMSIZ] = '\0'; > should be > ifr.ifr_name[IFNAMSIZ-1] = '\0'; > > thnx for fixing it :) fixed, thanks. -- Maxim Konovalov