mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
memarea: Don't assume that sizeof(ulong) >= sizeof(void*).
Fixes bug 18716; bugfix on 0.2.1.1-alpha where memarea.c was introduced. Found by wbenny.
This commit is contained in:
@@ -22,9 +22,9 @@
|
||||
#define MEMAREA_ALIGN SIZEOF_VOID_P
|
||||
|
||||
#if MEMAREA_ALIGN == 4
|
||||
#define MEMAREA_ALIGN_MASK 3lu
|
||||
#define MEMAREA_ALIGN_MASK ((uintptr_t)3)
|
||||
#elif MEMAREA_ALIGN == 8
|
||||
#define MEMAREA_ALIGN_MASK 7lu
|
||||
#define MEMAREA_ALIGN_MASK ((uintptr_t)7)
|
||||
#else
|
||||
#error "void* is neither 4 nor 8 bytes long. I don't know how to align stuff."
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user