aboutsummaryrefslogtreecommitdiff
path: root/coreutils/dd.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-04-19 20:16:14 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-04-19 20:16:14 +0000
commitf6250a3bee833db83e8a9ade62dce4e85830b6f7 (patch)
treeadd808579830b459bb559b421126338e2e6dcdd4 /coreutils/dd.c
parentd1801a44301ae10910763de860614b1aed9922d7 (diff)
downloadbusybox-w32-f6250a3bee833db83e8a9ade62dce4e85830b6f7.tar.gz
busybox-w32-f6250a3bee833db83e8a9ade62dce4e85830b6f7.tar.bz2
busybox-w32-f6250a3bee833db83e8a9ade62dce4e85830b6f7.zip
dd: NOEXEC fix
dd: correct wrongly capitalized constant
Diffstat (limited to 'coreutils/dd.c')
-rw-r--r--coreutils/dd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c
index 797aabdd9..5aee9dbb4 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -98,7 +98,7 @@ int dd_main(int argc, char **argv)
98 OP_conv, 98 OP_conv,
99 OP_conv_notrunc, 99 OP_conv_notrunc,
100 OP_conv_sync, 100 OP_conv_sync,
101 OP_conv_NOERROR, 101 OP_conv_noerror,
102#endif 102#endif
103 }; 103 };
104 int flags = TRUNC_FLAG; 104 int flags = TRUNC_FLAG;
@@ -109,6 +109,8 @@ int dd_main(int argc, char **argv)
109 const char *infile = NULL, *outfile = NULL; 109 const char *infile = NULL, *outfile = NULL;
110 char *ibuf, *obuf; 110 char *ibuf, *obuf;
111 111
112 memset(&G, 0, sizeof(G)); /* because of NOEXEC */
113
112 if (ENABLE_FEATURE_DD_SIGNAL_HANDLING) { 114 if (ENABLE_FEATURE_DD_SIGNAL_HANDLING) {
113 struct sigaction sa; 115 struct sigaction sa;
114 116
@@ -164,7 +166,7 @@ int dd_main(int argc, char **argv)
164 flags &= ~TRUNC_FLAG; 166 flags &= ~TRUNC_FLAG;
165 if (what == OP_conv_sync) 167 if (what == OP_conv_sync)
166 flags |= SYNC_FLAG; 168 flags |= SYNC_FLAG;
167 if (what == OP_conv_NOERROR) 169 if (what == OP_conv_noerror)
168 flags |= NOERROR; 170 flags |= NOERROR;
169 if (!key) /* no ',' left, so this was the last specifier */ 171 if (!key) /* no ',' left, so this was the last specifier */
170 break; 172 break;