diff options
| author | Ed Maste <emaste@FreeBSD.org> | 2011-01-04 00:11:09 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@FreeBSD.org> | 2011-01-04 00:11:09 +0000 |
| commit | 763e8c9623f8ac3c6d075ccb3d22afa8730afa19 (patch) | |
| tree | 3354412233bb9c81aef5d858ffdfa035de711bb9 /libexec/ftpd | |
| parent | 5568050d57cf0261f2b8eb0c5be458bbde6ba2fc (diff) | |
Notes
Diffstat (limited to 'libexec/ftpd')
| -rw-r--r-- | libexec/ftpd/ftpd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 78ebc7c737c0..dd9d469c8516 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -2350,6 +2350,10 @@ statfilecmd(char *filename) code = lstat(filename, &st) == 0 && S_ISDIR(st.st_mode) ? 212 : 213; (void)snprintf(line, sizeof(line), _PATH_LS " -lgA %s", filename); fin = ftpd_popen(line, "r"); + if (fin == NULL) { + perror_reply(551, filename); + return; + } lreply(code, "Status of %s:", filename); atstart = 1; while ((c = getc(fin)) != EOF) { |
