]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blobdiff - dev86/patches/02-dev86-0.16.17-fortify.patch
dev86: New package.
[people/ms/ipfire-3.x.git] / dev86 / patches / 02-dev86-0.16.17-fortify.patch
diff --git a/dev86/patches/02-dev86-0.16.17-fortify.patch b/dev86/patches/02-dev86-0.16.17-fortify.patch
new file mode 100644 (file)
index 0000000..715d0c4
--- /dev/null
@@ -0,0 +1,43 @@
+--- dev86-0.16.17/bcc/bcc.c
++++ dev86-0.16.17/bcc/bcc.c
+@@ -19,6 +19,7 @@
+ #ifdef __STDC__
+ #include <stdlib.h>
+ #ifndef MSDOS
++#include <limits.h>
+ #include <unistd.h>
+ #endif
+ #else
+@@ -596,12 +597,17 @@
+    }
+ }
+-void
+-command_reset()
+-{
+ #ifndef MAXPATHLEN
++#ifdef PATH_MAX
++#define MAXPATHLEN PATH_MAX
++#else
+ #define MAXPATHLEN 1024
+ #endif
++#endif
++
++void
++command_reset()
++{
+    char buf[MAXPATHLEN];
+    char ** prefix;
+    char * saved_cmd;
+@@ -1308,11 +1314,7 @@
+       for(d=s=ptr; d && *s; s=d)
+       {
+-#ifdef MAXPATHLEN
+          char buf[MAXPATHLEN];
+-#else
+-         char buf[1024];
+-#endif
+        free(temp);
+          d=strchr(s, ':');