Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Oct 1995 19:43:12 -0700
From:      David Greenman <davidg@Root.COM>
To:        Terry Lambert <terry@lambert.org>
Cc:        bde@zeta.org.au (Bruce Evans), jc@irbs.com, freebsd-current@freefall.freebsd.org
Subject:   Re: phkmalloc and X programs 
Message-ID:  <199510150243.TAA04565@corbin.Root.COM>
In-Reply-To: Your message of "Sat, 14 Oct 95 19:19:54 PDT." <199510150219.TAA22252@phaeton.artisoft.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>Probably the "correct" "fix" is to change:
>	if (!strncmp("inet:", lname, 5)) {
>To:
>	if (namelen >= 5 && !strncmp("inet:", lname, 5)) {

   No, lname is also used later in the code. The correct fix is to malloc
namelen+1 and null terminate the string after copy/converting it to lowercase.
e.g. lname[namelen] = '\0';

-DG



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