source: npl/system/netkit-ftp/patches/24-netkit-ftp-0.17-chkmalloc.patch @ a2d969e

perl-5.22
Last change on this file since a2d969e 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: 1.0 KB
  • netkit-ftp-0.17/ftp/ruserpass.c

    diff -up netkit-ftp-0.17/ftp/ruserpass.c.chkmalloc netkit-ftp-0.17/ftp/ruserpass.c
    old new next: 
    137137                        if (token()) {
    138138                                if (*aname == 0) {
    139139                                        *aname = malloc((unsigned) strlen(tokval) + 1);
    140                                         (void) strcpy(*aname, tokval);
     140                                        if (*aname != NULL)
     141                                                (void) strcpy(*aname, tokval);
    141142                                } else {
    142143                                        if (strcmp(*aname, tokval))
    143144                                                goto next;
    next: 
    158159                        }
    159160                        if (token() && *apass == 0) {
    160161                                *apass = malloc((unsigned) strlen(tokval) + 1);
    161                                 (void) strcpy(*apass, tokval);
     162                                if (*apass != NULL)
     163                                        (void) strcpy(*apass, tokval);
    162164                        }
    163165                        break;
    164166                case ACCOUNT:
    next: 
    170172                        }
    171173                        if (token() && *aacct == 0) {
    172174                                *aacct = malloc((unsigned) strlen(tokval) + 1);
    173                                 (void) strcpy(*aacct, tokval);
     175                                if (*aacct != NULL)
     176                                        (void) strcpy(*aacct, tokval);
    174177                        }
    175178                        break;
    176179                case MACDEF:
Note: See TracBrowser for help on using the repository browser.