Avoid pointer arithmetic on void pointer.
* src/gpgme.c (gpgme_io_writen): Use new var buffer. -- Reported-by: Albert Chin
This commit is contained in:
parent
97f9bec6d0
commit
a175922f8a
@ -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
|
written or an error is return. Returns: 0 on success or -1 on
|
||||||
error and the sets errno. */
|
error and the sets errno. */
|
||||||
int
|
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;
|
int ret = 0;
|
||||||
TRACE_BEG2 (DEBUG_GLOBAL, "gpgme_io_writen", fd,
|
TRACE_BEG2 (DEBUG_GLOBAL, "gpgme_io_writen", fd,
|
||||||
"buffer=%p, count=%u", buffer, count);
|
"buffer=%p, count=%u", buffer, count);
|
||||||
|
Loading…
Reference in New Issue
Block a user