aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-pgp-context.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-08-29 10:25:59 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-08-29 10:25:59 +0800
commit572e5648458cab1d530f1cb219efafc853030ba0 (patch)
tree326d3cb401b471cbdb233a44f0b62e7589017e41 /camel/camel-pgp-context.c
parent87b3e9277fde5e764c2dfdce6bc848afe84ef137 (diff)
downloadgsoc2013-evolution-572e5648458cab1d530f1cb219efafc853030ba0.tar
gsoc2013-evolution-572e5648458cab1d530f1cb219efafc853030ba0.tar.gz
gsoc2013-evolution-572e5648458cab1d530f1cb219efafc853030ba0.tar.bz2
gsoc2013-evolution-572e5648458cab1d530f1cb219efafc853030ba0.tar.lz
gsoc2013-evolution-572e5648458cab1d530f1cb219efafc853030ba0.tar.xz
gsoc2013-evolution-572e5648458cab1d530f1cb219efafc853030ba0.tar.zst
gsoc2013-evolution-572e5648458cab1d530f1cb219efafc853030ba0.zip
Initialize buf and diag_buf to NULL, hopefully this fixes the crash if the
2001-08-28 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (crypto_exec_with_passwd): Initialize buf and diag_buf to NULL, hopefully this fixes the crash if the select() times out. svn path=/trunk/; revision=12508
Diffstat (limited to 'camel/camel-pgp-context.c')
-rw-r--r--camel/camel-pgp-context.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/camel/camel-pgp-context.c b/camel/camel-pgp-context.c
index 3d048039d1..a8fef60ee4 100644
--- a/camel/camel-pgp-context.c
+++ b/camel/camel-pgp-context.c
@@ -277,17 +277,17 @@ crypto_exec_with_passwd (const char *path, char *argv[], const char *input, int
int passwd_fds[], const char *passphrase,
char **output, int *outlen, char **diagnostics)
{
- fd_set fdset, write_fdset;
- int ip_fds[2], op_fds[2], diag_fds[2];
- int select_result, read_len, write_len;
- size_t tmp_len;
- pid_t child;
- char *buf, *diag_buf;
- const char *passwd_next, *input_next;
- size_t size, alloc_size, diag_size, diag_alloc_size;
gboolean eof_seen, diag_eof_seen, passwd_eof_seen, input_eof_seen;
size_t passwd_remaining, passwd_incr, input_remaining, input_incr;
+ size_t size, alloc_size, diag_size, diag_alloc_size;
+ int select_result, read_len, write_len;
+ int ip_fds[2], op_fds[2], diag_fds[2];
+ const char *passwd_next, *input_next;
+ char *buf = NULL, *diag_buf = NULL;
+ fd_set fdset, write_fdset;
struct timeval timeout;
+ size_t tmp_len;
+ pid_t child;
if ((pipe (ip_fds) < 0 ) ||
@@ -409,7 +409,7 @@ crypto_exec_with_passwd (const char *path, char *argv[], const char *input, int
size += read_len;
}
- if (FD_ISSET(diag_fds[0], &fdset) ) {
+ if (FD_ISSET (diag_fds[0], &fdset) ) {
/* More stderr is available. */
if (diag_size + 1024 > diag_alloc_size) {
@@ -430,7 +430,7 @@ crypto_exec_with_passwd (const char *path, char *argv[], const char *input, int
diag_size += read_len;
}
- if (FD_ISSET(passwd_fds[1], &write_fdset)) {
+ if (FD_ISSET (passwd_fds[1], &write_fdset)) {
/* Ready for more password input. */
tmp_len = passwd_incr;
@@ -451,7 +451,7 @@ crypto_exec_with_passwd (const char *path, char *argv[], const char *input, int
}
}
- if (FD_ISSET(ip_fds[1], &write_fdset)) {
+ if (FD_ISSET (ip_fds[1], &write_fdset)) {
/* Ready for more ciphertext input. */
tmp_len = input_incr;