perl-5.22
|
Last change
on this file since 2bbc214 was
c5c522c,
checked in by Edwin Eefting <edwin@datux.nl>, 9 years ago
|
|
initial commit, transferred from cleaned syn3 svn tree
|
-
Property mode set to
100644
|
|
File size:
1.0 KB
|
| Rev | Line | |
|---|
| [c5c522c] | 1 | diff -up netkit-ftp-0.17/ftp/ruserpass.c.chkmalloc netkit-ftp-0.17/ftp/ruserpass.c |
|---|
| 2 | --- netkit-ftp-0.17/ftp/ruserpass.c.chkmalloc 2008-12-01 11:54:15.000000000 +0100 |
|---|
| 3 | +++ netkit-ftp-0.17/ftp/ruserpass.c 2008-12-01 11:56:06.000000000 +0100 |
|---|
| 4 | @@ -137,7 +137,8 @@ next: |
|---|
| 5 | if (token()) { |
|---|
| 6 | if (*aname == 0) { |
|---|
| 7 | *aname = malloc((unsigned) strlen(tokval) + 1); |
|---|
| 8 | - (void) strcpy(*aname, tokval); |
|---|
| 9 | + if (*aname != NULL) |
|---|
| 10 | + (void) strcpy(*aname, tokval); |
|---|
| 11 | } else { |
|---|
| 12 | if (strcmp(*aname, tokval)) |
|---|
| 13 | goto next; |
|---|
| 14 | @@ -158,7 +159,8 @@ next: |
|---|
| 15 | } |
|---|
| 16 | if (token() && *apass == 0) { |
|---|
| 17 | *apass = malloc((unsigned) strlen(tokval) + 1); |
|---|
| 18 | - (void) strcpy(*apass, tokval); |
|---|
| 19 | + if (*apass != NULL) |
|---|
| 20 | + (void) strcpy(*apass, tokval); |
|---|
| 21 | } |
|---|
| 22 | break; |
|---|
| 23 | case ACCOUNT: |
|---|
| 24 | @@ -170,7 +172,8 @@ next: |
|---|
| 25 | } |
|---|
| 26 | if (token() && *aacct == 0) { |
|---|
| 27 | *aacct = malloc((unsigned) strlen(tokval) + 1); |
|---|
| 28 | - (void) strcpy(*aacct, tokval); |
|---|
| 29 | + if (*aacct != NULL) |
|---|
| 30 | + (void) strcpy(*aacct, tokval); |
|---|
| 31 | } |
|---|
| 32 | break; |
|---|
| 33 | case MACDEF: |
|---|
Note: See
TracBrowser
for help on using the repository browser.