diff options
author | David Shaw <[email protected]> | 2002-09-10 18:03:40 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2002-09-10 18:03:40 +0000 |
commit | c30d7e8dc704acdb9cb8e32275ff4d115cc68cc6 (patch) | |
tree | 23345012cac28c471e3d7719a9a4aebf975a00a9 /g10/exec.c | |
parent | typo fixes and new credits. (diff) | |
download | gnupg-c30d7e8dc704acdb9cb8e32275ff4d115cc68cc6.tar.gz gnupg-c30d7e8dc704acdb9cb8e32275ff4d115cc68cc6.zip |
* exec.c (expand_args): Remove loop left over from earlier implementation.
(exec_write): Missed one tick.
Diffstat (limited to '')
-rw-r--r-- | g10/exec.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/g10/exec.c b/g10/exec.c index ea3d9c4d5..f220dd30f 100644 --- a/g10/exec.c +++ b/g10/exec.c @@ -262,10 +262,14 @@ static int expand_args(struct exec_info *info,const char *args_in) if(append) { - /* FIXME: Why do we need a loop? -wk */ - while(strlen(append)+len>size-1) + size_t applen=strlen(append); + + if(applen+len>size-1) { - size+=100; + if(applen<100) + applen=100; + + size+=applen; info->command=m_realloc(info->command,size); } @@ -471,7 +475,7 @@ int exec_write(struct exec_info **info,const char *program, (*info)->tochild=fopen((*info)->tempfile_in,binary?"wb":"w"); if((*info)->tochild==NULL) { - log_error(_("can't create '%s': %s\n"), + log_error(_("can't create `%s': %s\n"), (*info)->tempfile_in,strerror(errno)); ret=G10ERR_WRITE_FILE; goto fail; |