source:
npl/system/netkit-ftp/patches/24-netkit-ftp-0.17-chkmalloc.patch
@
26ffad7
Last change on this file since 26ffad7 was c5c522c, checked in by , 8 years ago | |
---|---|
|
|
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: 137 137 if (token()) { 138 138 if (*aname == 0) { 139 139 *aname = malloc((unsigned) strlen(tokval) + 1); 140 (void) strcpy(*aname, tokval); 140 if (*aname != NULL) 141 (void) strcpy(*aname, tokval); 141 142 } else { 142 143 if (strcmp(*aname, tokval)) 143 144 goto next; … … next: 158 159 } 159 160 if (token() && *apass == 0) { 160 161 *apass = malloc((unsigned) strlen(tokval) + 1); 161 (void) strcpy(*apass, tokval); 162 if (*apass != NULL) 163 (void) strcpy(*apass, tokval); 162 164 } 163 165 break; 164 166 case ACCOUNT: … … next: 170 172 } 171 173 if (token() && *aacct == 0) { 172 174 *aacct = malloc((unsigned) strlen(tokval) + 1); 173 (void) strcpy(*aacct, tokval); 175 if (*aacct != NULL) 176 (void) strcpy(*aacct, tokval); 174 177 } 175 178 break; 176 179 case MACDEF:
Note: See TracBrowser
for help on using the repository browser.