aboutsummaryrefslogtreecommitdiff
path: root/coreutils/dd.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/dd.c')
-rw-r--r--coreutils/dd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c
index f1e63fd8b..8173d403d 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -301,9 +301,12 @@ int dd_main(int argc UNUSED_PARAM, char **argv)
301 if (ftruncate(ofd, seek * obs) < 0) { 301 if (ftruncate(ofd, seek * obs) < 0) {
302 struct stat st; 302 struct stat st;
303 303
304 if (fstat(ofd, &st) < 0 || S_ISREG(st.st_mode) || 304 if (fstat(ofd, &st) < 0
305 S_ISDIR(st.st_mode)) 305 || S_ISREG(st.st_mode)
306 || S_ISDIR(st.st_mode)
307 ) {
306 goto die_outfile; 308 goto die_outfile;
309 }
307 } 310 }
308 } 311 }
309 } else { 312 } else {