Line 0
Link Here
|
|
|
1 |
--- services/plugins/vix/vixTools.c.orig 2017-12-15 21:11:49 UTC |
2 |
+++ services/plugins/vix/vixTools.c |
3 |
@@ -52,6 +52,7 @@ |
4 |
#include <stdarg.h> |
5 |
#include <fcntl.h> |
6 |
#include <errno.h> |
7 |
+#include <limits.h> |
8 |
|
9 |
#ifdef _WIN32 |
10 |
#include <WTypes.h> |
11 |
@@ -7330,7 +7331,7 @@ VixToolsRunScript(VixCommandRequestHeader *requestMsg, |
12 |
goto abort; |
13 |
} |
14 |
} |
15 |
- for (var = 0; var <= 0xFFFFFFFF; var++) { |
16 |
+ for (var = 0; ; var++) { |
17 |
free(tempScriptFilePath); |
18 |
tempScriptFilePath = Str_SafeAsprintf(NULL, |
19 |
"%s"DIRSEPS"%s%d%s", |
20 |
@@ -7372,6 +7373,9 @@ VixToolsRunScript(VixCommandRequestHeader *requestMsg, |
21 |
* deletes it), we should not try 4+ billion times. |
22 |
*/ |
23 |
break; |
24 |
+ } |
25 |
+ if (var == INT_MAX) { |
26 |
+ break; |
27 |
} |
28 |
} |
29 |
if (fd < 0) { |