diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2016-06-30 20:26:57 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 23:31:18 +0200 |
commit | d31c50870d0bee042ce660e445c9294a59a3a65b (patch) | |
tree | 6bfc0de3c95267b401b620c2c67859557dc60f97 /source/n/netkit-ftp/patches/33-netkit-ftp-0.17-token.patch | |
parent | 76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (diff) | |
download | current-d31c50870d0bee042ce660e445c9294a59a3a65b.tar.gz |
Slackware 14.2slackware-14.2
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! :-)
Diffstat (limited to 'source/n/netkit-ftp/patches/33-netkit-ftp-0.17-token.patch')
-rw-r--r-- | source/n/netkit-ftp/patches/33-netkit-ftp-0.17-token.patch | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/source/n/netkit-ftp/patches/33-netkit-ftp-0.17-token.patch b/source/n/netkit-ftp/patches/33-netkit-ftp-0.17-token.patch new file mode 100644 index 00000000..d8883009 --- /dev/null +++ b/source/n/netkit-ftp/patches/33-netkit-ftp-0.17-token.patch @@ -0,0 +1,75 @@ +diff -rup netkit-ftp-0.17/ftp/ruserpass.c netkit-ftp-0.17-new/ftp/ruserpass.c +--- netkit-ftp-0.17/ftp/ruserpass.c 2012-10-29 15:11:10.593841089 +0100 ++++ netkit-ftp-0.17-new/ftp/ruserpass.c 2012-10-29 15:13:14.379822697 +0100 +@@ -58,7 +58,8 @@ static int token(void); + #define ID 10 + #define MACH 11 + +-static char tokval[100]; ++#define MAXTOKENLEN 4096 ++static char tokval[MAXTOKENLEN]; + + static struct toktab { + const char *tokstr; +@@ -249,13 +250,16 @@ bad: + return(-1); + } + +-static ++static + int + token(void) + { + char *cp; + int c; + struct toktab *t; ++ size_t toklen = 0; ++ int showwarn = 1; ++ int quote = 0; + + if (feof(cfile)) + return (0); +@@ -266,20 +270,32 @@ token(void) + return (0); + cp = tokval; + if (c == '"') { +- while ((c = getc(cfile)) != EOF && c != '"') { +- if (c == '\\') +- c = getc(cfile); +- *cp++ = c; +- } +- } else { ++ quote = 1; ++ } ++ else { + *cp++ = c; +- while ((c = getc(cfile)) != EOF +- && c != '\n' && c != '\t' && c != ' ' && c != ',') { +- if (c == '\\') +- c = getc(cfile); +- *cp++ = c; ++ toklen++; ++ } ++ while ((c = getc(cfile)) != EOF) { ++ if (c == '"') ++ break; ++ if (c == '\\') ++ c = getc(cfile); ++ if (!quote && (c == '\n' || c == '\t' || c == ' ' || c == ',')) ++ break; ++ if (toklen >= MAXTOKENLEN) { ++ if (showwarn) { ++ fprintf(stderr, ++ "Warning: .netrc token too long, will be trunctated to %zd characters\n", ++ toklen); ++ showwarn = 0; ++ } ++ continue; + } ++ *cp++ = c; ++ toklen++; + } ++ + *cp = 0; + if (tokval[0] == 0) + return (0); |