1666a24e9c
The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/ftp#b1415fc448cd0131b94f8c8bcaede3f1eb394460
34 lines
1.0 KiB
Diff
34 lines
1.0 KiB
Diff
diff -up netkit-ftp-0.17/ftp/ruserpass.c.chkmalloc netkit-ftp-0.17/ftp/ruserpass.c
|
|
--- netkit-ftp-0.17/ftp/ruserpass.c.chkmalloc 2008-12-01 11:54:15.000000000 +0100
|
|
+++ netkit-ftp-0.17/ftp/ruserpass.c 2008-12-01 11:56:06.000000000 +0100
|
|
@@ -137,7 +137,8 @@ next:
|
|
if (token()) {
|
|
if (*aname == 0) {
|
|
*aname = malloc((unsigned) strlen(tokval) + 1);
|
|
- (void) strcpy(*aname, tokval);
|
|
+ if (*aname != NULL)
|
|
+ (void) strcpy(*aname, tokval);
|
|
} else {
|
|
if (strcmp(*aname, tokval))
|
|
goto next;
|
|
@@ -158,7 +159,8 @@ next:
|
|
}
|
|
if (token() && *apass == 0) {
|
|
*apass = malloc((unsigned) strlen(tokval) + 1);
|
|
- (void) strcpy(*apass, tokval);
|
|
+ if (*apass != NULL)
|
|
+ (void) strcpy(*apass, tokval);
|
|
}
|
|
break;
|
|
case ACCOUNT:
|
|
@@ -170,7 +172,8 @@ next:
|
|
}
|
|
if (token() && *aacct == 0) {
|
|
*aacct = malloc((unsigned) strlen(tokval) + 1);
|
|
- (void) strcpy(*aacct, tokval);
|
|
+ if (*aacct != NULL)
|
|
+ (void) strcpy(*aacct, tokval);
|
|
}
|
|
break;
|
|
case MACDEF:
|