Date: Tue, 11 May 2010 18:20:45 GMT From: Garrett Cooper <gcooper@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 178112 for review Message-ID: <201005111820.o4BIKjMe054113@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@178112?ac=10 Change 178112 by gcooper@starr-bastion on 2010/05/11 18:20:16 Actually fix the compile because the perforce reverted the changes -_-... Affected files ... .. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/create/perform.c#15 edit Differences ... ==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/create/perform.c#15 (text+ko) ==== @@ -412,11 +412,11 @@ * NOTE (gcooper): No sense in calloc'ing destfile or srcfile as the * first byte is zeroed out below in the archive add loop. */ - if ((destfile = malloc(PATH_MAX, sizeof(char))) == NULL || + if ((destfile = malloc(PATH_MAX * sizeof(char))) == NULL || (destbase = calloc(PATH_MAX, sizeof(char))) == NULL || (prefix = calloc(PATH_MAX, sizeof(char))) == NULL || (srcbase = calloc(PATH_MAX, sizeof(char))) == NULL || - (srcfile = malloc(PATH_MAX, sizeof(char))) == NULL) + (srcfile = malloc(PATH_MAX * sizeof(char))) == NULL) error = strerror(errno); /* * If the package tarball exists already, and we are running in @@ -573,7 +573,7 @@ if (strlcpy(srcbase, BaseDir, PATH_MAX) > PATH_MAX) error = strerror(ENAMETOOLONG); - + } if (strlcpy(srcbase, prefix, PATH_MAX) > PATH_MAX) error = strerror(ENAMETOOLONG); @@ -588,7 +588,7 @@ /* First @cwd -- wewt! */ if (prefix == NULL) { - if (strlen(p->name) > MAX_PATH) + if (strlen(p->name) > PATH_MAX) error = strerror(ENAMETOOLONG); else {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005111820.o4BIKjMe054113>