source: npl/system/netkit-ftp/patches/13-netkit-ftp-0.17-longnames.patch @ c9755c3

perl-5.22
Last change on this file since c9755c3 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100644
File size: 3.2 KB
  • netkit-ftp-0.17/ftp/cmds.c

    old new  
    10571057status(void)
    10581058{
    10591059        int i;
    1060 
    1061         if (connected)
     1060        if (connected)
    10621061                printf("Connected to %s.\n", hostname);
    1063         else
     1062        else 
    10641063                printf("Not connected.\n");
    10651064        if (!proxy) {
    10661065                pswitch(1);
     
    10811080                onoff(runique));
    10821081        printf("Case: %s; CR stripping: %s\n",onoff(mcase),onoff(crflag));
    10831082        if (ntflag) {
    1084                 printf("Ntrans: (in) %s (out) %s\n", ntin,ntout);
     1083                printf("Ntrans: (in) %s (out) %s\n",ntin,ntout);
    10851084        }
    10861085        else {
    10871086                printf("Ntrans: off\n");
     
    19481947        }
    19491948        ntflag++;
    19501949        code = ntflag;
    1951         (void) strncpy(ntin, argv[1], 16);
    1952         ntin[16] = '\0';
     1950        (void) strncpy(ntin, argv[1], NTRANS_MAX);
     1951        ntin[NTRANS_MAX] = '\0';
    19531952        if (argc == 2) {
    19541953                ntout[0] = '\0';
    19551954                return;
    19561955        }
    1957         (void) strncpy(ntout, argv[2], 16);
    1958         ntout[16] = '\0';
     1956        (void) strncpy(ntout, argv[2], NTRANS_MAX);
     1957        ntout[NTRANS_MAX] = '\0';
    19591958}
    19601959
    19611960static char *
     
    19651964        char *cp1, *cp2 = new;
    19661965        register int i, ostop, found;
    19671966
    1968         for (ostop = 0; *(ntout + ostop) && ostop < 16; ostop++);
     1967        for (ostop = 0; *(ntout + ostop) && ostop < NTRANS_MAX; ostop++);
    19691968        for (cp1 = name; *cp1; cp1++) {
    19701969                found = 0;
    1971                 for (i = 0; *(ntin + i) && i < 16; i++) {
     1970                for (i = 0; *(ntin + i) && i < NTRANS_MAX; i++) {
    19721971                        if (*cp1 == *(ntin + i)) {
    19731972                                found++;
    19741973                                if (i < ostop) {
  • netkit-ftp-0.17/ftp/ftp.c

    old new  
    16561656                int runqe;
    16571657                int mcse;
    16581658                int ntflg;
    1659                 char nti[17];
    1660                 char nto[17];
     1659                char nti[NTRANS_MAX+1];
     1660                char nto[NTRANS_MAX+1];
    16611661                int mapflg;
    16621662                char mi[MAXPATHLEN];
    16631663                char mo[MAXPATHLEN];
     
    17121712        mcase = op->mcse;
    17131713        ip->ntflg = ntflag;
    17141714        ntflag = op->ntflg;
    1715         (void) strncpy(ip->nti, ntin, 16);
    1716         (ip->nti)[16] = '\0';           /* shouldn't use strlen */
     1715        (void) strncpy(ip->nti, ntin, NTRANS_MAX);
     1716        (ip->nti)[NTRANS_MAX] = '\0';           /* shouldn't use strlen */
    17171717        (void) strcpy(ntin, op->nti);
    1718         (void) strncpy(ip->nto, ntout, 16);
    1719         (ip->nto)[16] = '\0';
     1718        (void) strncpy(ip->nto, ntout, NTRANS_MAX);
     1719        (ip->nto)[NTRANS_MAX] = '\0';
    17201720        (void) strcpy(ntout, op->nto);
    17211721        ip->mapflg = mapflag;
    17221722        mapflag = op->mapflg;
  • netkit-ftp-0.17/ftp/ftp_var.h

    old new  
    4242
    4343#include <setjmp.h>
    4444#include <sys/param.h>
     45#define NTRANS_MAX      64
    4546
    4647/*
    4748 * Tick counter step size.
     
    8283Extern char     pasv[64];       /* passive port for proxy data connection */
    8384Extern int      passivemode;    /* passive mode enabled */
    8485Extern char     *altarg;        /* argv[1] with no shell-like preprocessing  */
    85 Extern char     ntin[17];       /* input translation table */
    86 Extern char     ntout[17];      /* output translation table */
     86Extern char     ntin[NTRANS_MAX+1];     /* input translation table */
     87Extern char     ntout[NTRANS_MAX+1];    /* output translation table */
    8788Extern char     mapin[MAXPATHLEN];      /* input map template */
    8889Extern char     mapout[MAXPATHLEN];     /* output map template */
    8990Extern char     typename[32];           /* name of file transfer type */
Note: See TracBrowser for help on using the repository browser.