parent
6a4c511715
commit
5652a7377f
@ -1,25 +0,0 @@
|
||||
From 32b2d3034b04a54118bc95c3f83ea5af78f9de41 Mon Sep 17 00:00:00 2001
|
||||
From: Nikolay Amiantov <ab@fmap.me>
|
||||
Date: Thu, 20 Nov 2014 05:08:45 +0300
|
||||
Subject: [PATCH] Fix test_filter_ipc for cleared supplementary groups
|
||||
|
||||
This should fix part of [https://github.com/zeromq/libzmq/issues/1129].
|
||||
---
|
||||
tests/test_filter_ipc.cpp | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/test_filter_ipc.cpp b/tests/test_filter_ipc.cpp
|
||||
index 00518f710..83035949b 100644
|
||||
--- a/tests/test_filter_ipc.cpp
|
||||
+++ b/tests/test_filter_ipc.cpp
|
||||
@@ -122,8 +122,8 @@ int main (void)
|
||||
// Get the group and supplimental groups of the process owner
|
||||
gid_t groups[100];
|
||||
int ngroups = getgroups(100, groups);
|
||||
- assert (ngroups != -1 && ngroups != 0);
|
||||
- gid_t group = getgid(), supgroup = groups[0], notgroup = groups[ngroups - 1] + 1;
|
||||
+ assert (ngroups != -1);
|
||||
+ gid_t group = getgid(), supgroup = group, notgroup = group + 1;
|
||||
for (int i = 0; i < ngroups; i++) {
|
||||
if (supgroup == group && group != groups[i])
|
||||
supgroup = groups[i];
|
@ -1,27 +0,0 @@
|
||||
From 25a50ca0d5d3ea076c63c23692e4cb9868bfb55d Mon Sep 17 00:00:00 2001
|
||||
From: KIU Shueng Chuan <nixchuan@gmail.com>
|
||||
Date: Tue, 8 Sep 2015 17:26:31 +0800
|
||||
Subject: [PATCH] avoid dereferencing uint32_t on unaligned address
|
||||
|
||||
---
|
||||
src/socket_base.cpp | 21 +++++----------------
|
||||
1 file changed, 5 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/socket_base.cpp b/src/socket_base.cpp
|
||||
index a980015fc..ea178a868 100644
|
||||
--- a/src/socket_base.cpp
|
||||
+++ b/src/socket_base.cpp
|
||||
@@ -1361,8 +1361,11 @@ void zmq::socket_base_t::monitor_event (int event_, int value_, const std::strin
|
||||
zmq_msg_t msg;
|
||||
zmq_msg_init_size (&msg, 6);
|
||||
uint8_t *data = (uint8_t *) zmq_msg_data (&msg);
|
||||
- *(uint16_t *) (data + 0) = (uint16_t) event_;
|
||||
- *(uint32_t *) (data + 2) = (uint32_t) value_;
|
||||
+ // Avoid dereferencing uint32_t on unaligned address
|
||||
+ uint16_t event = (uint16_t) event_;
|
||||
+ uint32_t value = (uint32_t) value_;
|
||||
+ memcpy (data + 0, &event, sizeof(event));
|
||||
+ memcpy (data + 2, &value, sizeof(value));
|
||||
zmq_sendmsg (monitor_socket, &msg, ZMQ_SNDMORE);
|
||||
|
||||
// Send address in second frame
|
@ -1 +1 @@
|
||||
c89db4dbc0b90c34c9f4983cbff6d321 zeromq-4.1.6.tar.gz
|
||||
SHA512 (libzmq-4.3.1.tar.gz) = 64855a73331a194c43b01aa86a985a149eba4ed32b9f6483d2a7415cfd8bba557aab5b7b33d160cd177141de02360b73c20e4696a19c2cd798eb5f82eeb72840
|
||||
|
Loading…
Reference in new issue