summaryrefslogtreecommitdiff
path: root/util/ecst.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/ecst.c')
-rwxr-xr-xutil/ecst.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/ecst.c b/util/ecst.c
index 73e6deb0e4..773b2ef956 100755
--- a/util/ecst.c
+++ b/util/ecst.c
@@ -389,7 +389,8 @@ int main(int argc, char *argv[])
/* Copy back the restored arguments. */
for (tmp_ind = 0;
- tmp_ind < tmp_arg_num;
+ (tmp_ind < tmp_arg_num) &&
+ (arg_ind < MAX_ARGS);
tmp_ind++) {
strncpy(hdr_args[arg_ind++],
tmp_hdr_args[tmp_ind],