Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Mar 1995 17:08:21 -0700
From:      Nate Williams <nate@trout.sri.MT.net>
To:        Steven G Kargl  <kargl@troutmask.apl.washington.edu>, freebsd-hackers@freefall.cdrom.com (FreeBSD)
Subject:   Re: install compressed binary patch
Message-ID:  <199503140008.RAA03977@trout.sri.MT.net>
In-Reply-To: Steven G Kargl  <kargl@troutmask.apl.washington.edu> "install compressed binary patch" (Mar 13,  3:46pm)

next in thread | previous in thread | raw e-mail | index | archive | help
> I have added a `-z' option to install.

Cool.

But..

> + 	/*
> + 	 * Compression must have been successful, if we get here.
> + 	 * So, build a filename for the gzipped file
> + 	 */
> + 	if (strlen(to_name) < MAXPATHLEN - 3)
> + 		strcpy(gz_name, to_name);
> + 	strcat(gz_name, ".gz");

What happens if strlen(to_name) >= MAXPATHLEN -3?

Also, wouldn't it be better to copy the file into a temporary directory,
gzip it, and then install the gzipped executable rather than the symlink
solution?  We don't need multiple copies of the file lying around IMHO.


Nate



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