From owner-p4-projects@FreeBSD.ORG Tue May 11 18:20:45 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 90FE71065674; Tue, 11 May 2010 18:20:45 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 555EF106566C for ; Tue, 11 May 2010 18:20:45 +0000 (UTC) (envelope-from gcooper@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 431D48FC13 for ; Tue, 11 May 2010 18:20:45 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BIKjXL054115 for ; Tue, 11 May 2010 18:20:45 GMT (envelope-from gcooper@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o4BIKjMe054113 for perforce@freebsd.org; Tue, 11 May 2010 18:20:45 GMT (envelope-from gcooper@FreeBSD.org) Date: Tue, 11 May 2010 18:20:45 GMT Message-Id: <201005111820.o4BIKjMe054113@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gcooper@FreeBSD.org using -f From: Garrett Cooper To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 178112 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 May 2010 18:20:45 -0000 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 {