svn commit: r457864 - in head/emulators/open-vm-tools: . files
Josh Paetzel
jpaetzel at FreeBSD.org
Tue Jan 2 14:45:08 UTC 2018
Author: jpaetzel
Date: Tue Jan 2 14:45:06 2018
New Revision: 457864
URL: https://svnweb.freebsd.org/changeset/ports/457864
Log:
Fix build with clang 6.0.0
Also avoids an endless loop in practice
PR: 224816
Submitted by: dim
Added:
head/emulators/open-vm-tools/files/patch-services_plugins_vix_vixTools.c (contents, props changed)
Modified:
head/emulators/open-vm-tools/Makefile
Modified: head/emulators/open-vm-tools/Makefile
==============================================================================
--- head/emulators/open-vm-tools/Makefile Tue Jan 2 14:44:55 2018 (r457863)
+++ head/emulators/open-vm-tools/Makefile Tue Jan 2 14:45:06 2018 (r457864)
@@ -4,7 +4,7 @@
PORTNAME= open-vm-tools
PORTVERSION= ${RELEASE_VER}
DISTVERSIONPREFIX= stable-
-PORTREVISION= 1
+PORTREVISION= 2
PORTEPOCH= 2
CATEGORIES= emulators
Added: head/emulators/open-vm-tools/files/patch-services_plugins_vix_vixTools.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/open-vm-tools/files/patch-services_plugins_vix_vixTools.c Tue Jan 2 14:45:06 2018 (r457864)
@@ -0,0 +1,29 @@
+--- services/plugins/vix/vixTools.c.orig 2017-12-15 21:11:49 UTC
++++ services/plugins/vix/vixTools.c
+@@ -52,6 +52,7 @@
+ #include <stdarg.h>
+ #include <fcntl.h>
+ #include <errno.h>
++#include <limits.h>
+
+ #ifdef _WIN32
+ #include <WTypes.h>
+@@ -7330,7 +7331,7 @@ VixToolsRunScript(VixCommandRequestHeader *requestMsg,
+ goto abort;
+ }
+ }
+- for (var = 0; var <= 0xFFFFFFFF; var++) {
++ for (var = 0; ; var++) {
+ free(tempScriptFilePath);
+ tempScriptFilePath = Str_SafeAsprintf(NULL,
+ "%s"DIRSEPS"%s%d%s",
+@@ -7372,6 +7373,9 @@ VixToolsRunScript(VixCommandRequestHeader *requestMsg,
+ * deletes it), we should not try 4+ billion times.
+ */
+ break;
++ }
++ if (var == INT_MAX) {
++ break;
+ }
+ }
+ if (fd < 0) {
More information about the svn-ports-all
mailing list