Date: Wed, 24 Oct 2012 21:16:33 GMT From: Garrett Cooper <yanegomi@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/173038: [patch] emulators/open-vm-tools: fix signage bugs with clang Message-ID: <201210242116.q9OLGXIo050971@red.freebsd.org> Resent-Message-ID: <201210242120.q9OLK025070218@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210242116.q9OLGXIo050971>