From dd9c8c56719db093b8daa23aa40b2be71bbd1526 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 4182c74a..438fef21 100644 --- a/src/gpgme.c +++ b/src/gpgme.c @@ -691,8 +691,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);