From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Oct 24 21:20:01 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 00D96EEA for ; Wed, 24 Oct 2012 21:20:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.FreeBSD.org [8.8.178.135]) by mx1.freebsd.org (Postfix) with ESMTP id CB01C8FC0C for ; Wed, 24 Oct 2012 21:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q9OLK0i7070219 for ; Wed, 24 Oct 2012 21:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q9OLK025070218; Wed, 24 Oct 2012 21:20:00 GMT (envelope-from gnats) Resent-Date: Wed, 24 Oct 2012 21:20:00 GMT Resent-Message-Id: <201210242120.q9OLK025070218@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Garrett Cooper Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E583EBE for ; Wed, 24 Oct 2012 21:16:33 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 5C7B08FC14 for ; Wed, 24 Oct 2012 21:16:33 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q9OLGX1f050972 for ; Wed, 24 Oct 2012 21:16:33 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id q9OLGXIo050971; Wed, 24 Oct 2012 21:16:33 GMT (envelope-from nobody) Message-Id: <201210242116.q9OLGXIo050971@red.freebsd.org> Date: Wed, 24 Oct 2012 21:16:33 GMT From: Garrett Cooper To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/173038: [patch] emulators/open-vm-tools: fix signage bugs with clang X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2012 21:20:01 -0000 >Number: 173038 >Category: ports >Synopsis: [patch] emulators/open-vm-tools: fix signage bugs with clang >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Oct 24 21:20:00 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Garrett Cooper >Release: 10-CURRENT >Organization: EMC Isilon >Environment: FreeBSD fallout-atf-current.local 10.0-CURRENT FreeBSD 10.0-CURRENT #3: Mon Oct 22 10:30:54 PDT 2012 root@fallout-atf-current.local:/usr/obj/usr/src/sys/GENERIC i386 >Description: There are a number of bugs found by clang dealing with signed quantities that cause the build to fail. These are easy to fix and have already been fixed on the upstream git master, but it would be nice to have the fixes in ports as well. >How-To-Repeat: cd /usr/ports/emulators/open-vm-tools-nox11 make all CC=clang CXX=clang++ CPP=clang-cpp >Fix: Patch attached with submission follows: Index: emulators/open-vm-tools/files/patch-hgfsserver-hgfsserver.c =================================================================== --- emulators/open-vm-tools/files/patch-hgfsserver-hgfsserver.c (revision 0) +++ emulators/open-vm-tools/files/patch-hgfsserver-hgfsserver.c (working copy) @@ -0,0 +1,11 @@ +--- lib/hgfsServer/hgfsServer.c.orig 2012-10-24 13:19:29.622218256 -0700 ++++ lib/hgfsServer/hgfsServer.c 2012-10-24 13:19:46.272229169 -0700 +@@ -3557,7 +3557,7 @@ + * delimiter on copy. Allow 0 length drives so that hidden feature "" can + * work. + */ +- if (pathLength < 0 || pathLength >= sizeof p.mountPoint) { ++ if (pathLength >= sizeof p.mountPoint) { + LOG(4, ("%s: could not get the volume name\n", __FUNCTION__)); + + return FALSE; Index: emulators/open-vm-tools/files/patch-hgfsserver-hgfsserverlinux.c =================================================================== --- emulators/open-vm-tools/files/patch-hgfsserver-hgfsserverlinux.c (revision 0) +++ emulators/open-vm-tools/files/patch-hgfsserver-hgfsserverlinux.c (working copy) @@ -0,0 +1,11 @@ +--- ./work/open-vm-tools-8.6.0-425873/lib/hgfsServer/hgfsServerLinux.c.orig 2012-10-24 13:36:24.027191970 -0700 ++++ ./work/open-vm-tools-8.6.0-425873/lib/hgfsServer/hgfsServerLinux.c 2012-10-24 13:36:32.935195764 -0700 +@@ -551,7 +551,7 @@ + + arraySize = ARRAYSIZE(HgfsServerOpenFlags); + +- if (flagsIn < 0 || flagsIn >= arraySize) { ++ if (flagsIn >= arraySize) { + Log("%s: Invalid HgfsOpenFlags %d\n", __FUNCTION__, flagsIn); + + return FALSE; >Release-Note: >Audit-Trail: >Unformatted: