mirror of
git://slackware.nl/current.git
synced 2024-12-28 09:59:53 +01:00
d31c50870d
Thu Jun 30 20:26:57 UTC 2016 Slackware 14.2 x86_64 stable is released! The long development cycle (the Linux community has lately been living in "interesting times", as they say) is finally behind us, and we're proud to announce the release of Slackware 14.2. The new release brings many updates and modern tools, has switched from udev to eudev (no systemd), and adds well over a hundred new packages to the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else who pitched in to help make this release a reality. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Have fun! :-)
55 lines
1.4 KiB
Diff
55 lines
1.4 KiB
Diff
diff -up netkit-ftp-0.17/ftp/glob.c.arg_max netkit-ftp-0.17/ftp/glob.c
|
|
--- netkit-ftp-0.17/ftp/glob.c.arg_max 2008-04-07 11:41:14.000000000 +0200
|
|
+++ netkit-ftp-0.17/ftp/glob.c 2008-04-07 12:01:53.000000000 +0200
|
|
@@ -50,6 +50,7 @@ char glob_rcsid[] =
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
+#include <unistd.h>
|
|
|
|
#include "ftp_var.h" /* for protos only */
|
|
#include "glob.h"
|
|
@@ -57,7 +58,7 @@ char glob_rcsid[] =
|
|
#define QUOTE 0200
|
|
#define TRIM 0177
|
|
#define eq(a,b) (strcmp(a, b)==0)
|
|
-#define GAVSIZ (ARG_MAX/6)
|
|
+#define GAVSIZ (sysconf(_SC_ARG_MAX)/6)
|
|
#define isdir(d) ((d.st_mode & S_IFMT) == S_IFDIR)
|
|
|
|
const char *globerr;
|
|
@@ -115,7 +116,7 @@ char **
|
|
ftpglob(const char *v)
|
|
{
|
|
char agpath[BUFSIZ];
|
|
- entry agargv[GAVSIZ];
|
|
+ entry *agargv;
|
|
centry vv[2];
|
|
vv[0].text = v;
|
|
vv[1].text = NULL;
|
|
@@ -133,6 +134,8 @@ ftpglob(const char *v)
|
|
/* added ()'s to sizeof, (ambigious math for the compiler) */
|
|
lastgpathp = agpath + (sizeof(agpath)- 2);
|
|
|
|
+ agargv = (entry *)malloc(sizeof (entry) * GAVSIZ);
|
|
+ if (agargv == NULL) fatal("Out of memory");
|
|
ginit(agargv);
|
|
globcnt = 0;
|
|
collect(v);
|
|
@@ -156,7 +159,7 @@ ginit(entry *agargv)
|
|
gargv = agargv;
|
|
sortbas = agargv;
|
|
gargc = 0;
|
|
- gnleft = ARG_MAX - 4;
|
|
+ gnleft = sysconf(_SC_ARG_MAX) - 4;
|
|
}
|
|
|
|
static
|
|
@@ -674,6 +677,7 @@ efree(entry *av)
|
|
{
|
|
int i;
|
|
for (i=0; av[i].text; i++) free(av[i].text);
|
|
+ free((void *)av);
|
|
}
|
|
|
|
static
|