diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/assuan-handler.c | 2 | ||||
-rw-r--r-- | src/assuan-pipe-connect.c | 3 | ||||
-rw-r--r-- | src/assuan-uds.c | 10 |
3 files changed, 9 insertions, 6 deletions
diff --git a/src/assuan-handler.c b/src/assuan-handler.c index 351446d..dec0f1b 100644 --- a/src/assuan-handler.c +++ b/src/assuan-handler.c @@ -661,7 +661,7 @@ dispatch_command (assuan_context_t ctx, char *line, int linelen) if (!s) return PROCESS_DONE (ctx, set_error (ctx, GPG_ERR_ASS_UNKNOWN_CMD, NULL)); line += shift; - linelen -= shift; + /* linelen -= shift; -- not needed. */ if (ctx->pre_cmd_notify_fnc) { err = ctx->pre_cmd_notify_fnc(ctx, ctx->cmdtbl[i].name); diff --git a/src/assuan-pipe-connect.c b/src/assuan-pipe-connect.c index e5d2a38..a657c94 100644 --- a/src/assuan-pipe-connect.c +++ b/src/assuan-pipe-connect.c @@ -347,10 +347,11 @@ socketpair_connect (assuan_context_t ctx, fd_child_list[idx] = child_fds[idx + 1]; } + _assuan_free (ctx, child_fds); + /* If this is the server child process, exit early. */ if (! name && (*argv)[0] == 's') { - _assuan_free (ctx, child_fds); _assuan_close (ctx, fds[0]); return 0; } diff --git a/src/assuan-uds.c b/src/assuan-uds.c index dd77af4..59f3a6b 100644 --- a/src/assuan-uds.c +++ b/src/assuan-uds.c @@ -34,7 +34,7 @@ #else # ifdef HAVE_WINSOCK2_H # include <winsock2.h> -# endif +# endif # include <windows.h> #endif #if HAVE_SYS_UIO_H @@ -60,10 +60,10 @@ #define MY_ALIGN(n) ((((n))+ sizeof(size_t)-1) & (size_t)~(sizeof(size_t)-1)) #ifndef CMSG_SPACE #define CMSG_SPACE(n) (MY_ALIGN(sizeof(struct cmsghdr)) + MY_ALIGN((n))) -#endif +#endif #ifndef CMSG_LEN #define CMSG_LEN(n) (MY_ALIGN(sizeof(struct cmsghdr)) + (n)) -#endif +#endif #ifndef CMSG_FIRSTHDR #define CMSG_FIRSTHDR(mhdr) \ ((size_t)(mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ @@ -200,12 +200,14 @@ uds_sendfd (assuan_context_t ctx, assuan_fd_t fd) char buffer[80]; /* We need to send some real data so that a read won't return 0 - which will be taken as an EOF. It also helps with debugging. */ + which will be taken as an EOF. It also helps with debugging. */ snprintf (buffer, sizeof(buffer)-1, "# descriptor %d is in flight\n", fd); buffer[sizeof(buffer)-1] = 0; memset (&msg, 0, sizeof (msg)); + memset (&control_u, 0, sizeof (control_u)); + msg.msg_name = NULL; msg.msg_namelen = 0; msg.msg_iovlen = 1; |