Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Apr 2007 20:09:40 +0400 (MSD)
From:      Maxim Konovalov <maxim@macomnet.ru>
To:        Roman Divacky <rdivacky@freebsd.org>
Cc:        current@freebsd.org
Subject:   Re: off-by-one error in sbin/atm
Message-ID:  <20070414200928.F9990@mp2.macomnet.net>
In-Reply-To: <20070414154242.GA82355@freebsd.org>
References:  <20070414154242.GA82355@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070414200928.F9990>