summaryrefslogtreecommitdiffstats
path: root/libexec/ftpd/ftpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/ftpd/ftpd.c')
-rw-r--r--libexec/ftpd/ftpd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 78ebc7c..dd9d469 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) {
OpenPOWER on IntegriCloud