mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
priv: Fix explicit_bzero macro if we pass a function
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -287,7 +287,8 @@ int ssh_connector_remove_event(ssh_connector connector);
|
|||||||
#if defined(HAVE_GCC_VOLATILE_MEMORY_PROTECTION)
|
#if defined(HAVE_GCC_VOLATILE_MEMORY_PROTECTION)
|
||||||
#define explicit_bzero(s, n) do { \
|
#define explicit_bzero(s, n) do { \
|
||||||
if ((s) != NULL) { \
|
if ((s) != NULL) { \
|
||||||
memset((s), '\0', (n)); __asm__ volatile("" : : "r"(&(s)) : "memory"); \
|
void *_x = (s); \
|
||||||
|
memset((_x), '\0', (n)); __asm__ volatile("" : : "r"(&(_x)) : "memory"); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
#else /* HAVE_GCC_VOLATILE_MEMORY_PROTECTION */
|
#else /* HAVE_GCC_VOLATILE_MEMORY_PROTECTION */
|
||||||
|
|||||||
Reference in New Issue
Block a user