From a175922f8a8a422aba08175c88c60cbc96113791 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 11 Mar 2014 13:58:38 +0100 Subject: [PATCH] Avoid pointer arithmetic on void pointer. * src/gpgme.c (gpgme_io_writen): Use new var buffer. -- Reported-by: Albert Chin --- src/gpgme.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gpgme.c b/src/gpgme.c index b0ef03cf..51b68a58 100644 --- a/src/gpgme.c +++ b/src/gpgme.c @@ -678,8 +678,9 @@ gpgme_io_write (int fd, const void *buffer, size_t count) written or an error is return. Returns: 0 on success or -1 on error and the sets errno. */ int -gpgme_io_writen (int fd, const void *buffer, size_t count) +gpgme_io_writen (int fd, const void *buffer_arg, size_t count) { + const char *buffer = buffer_arg; int ret = 0; TRACE_BEG2 (DEBUG_GLOBAL, "gpgme_io_writen", fd, "buffer=%p, count=%u", buffer, count);