mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-02 20:30:14 +01:00
Problem: test_security_zap fails on architectures that disallow unaligned pointer access
Solution: use memcpy instead of doing pointer arithmetics with casting and dereferencing to fix the error on sparc64
This commit is contained in:
parent
6a3c8b46f6
commit
4147957a5e
@ -345,7 +345,7 @@ static int get_monitor_event_internal (void *monitor_,
|
||||
uint8_t *data = (uint8_t *) zmq_msg_data (&msg);
|
||||
uint16_t event = *(uint16_t *) (data);
|
||||
if (value_)
|
||||
*value_ = *(uint32_t *) (data + 2);
|
||||
memcpy (value_, data + 2, sizeof (uint32_t));
|
||||
|
||||
// Second frame in message contains event address
|
||||
zmq_msg_init (&msg);
|
||||
|
Loading…
x
Reference in New Issue
Block a user