You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2017/01/04 18:07:29 UTC

[1/2] qpid-dispatch git commit: DISPATCH-601 - Fixed a use-of-uninitialized-data defect found by Valgrind.

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 1a3775066 -> fcc370e66


DISPATCH-601 - Fixed a use-of-uninitialized-data defect found by Valgrind.


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/f27b0107
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/f27b0107
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/f27b0107

Branch: refs/heads/master
Commit: f27b0107858f0a384ce19789ca97ec83c8d78804
Parents: 1a37750
Author: Ted Ross <tr...@redhat.com>
Authored: Wed Jan 4 08:06:41 2017 -0500
Committer: Ted Ross <tr...@redhat.com>
Committed: Wed Jan 4 08:06:41 2017 -0500

----------------------------------------------------------------------
 src/router_core/terminus.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/f27b0107/src/router_core/terminus.c
----------------------------------------------------------------------
diff --git a/src/router_core/terminus.c b/src/router_core/terminus.c
index 1587047..abd6a7b 100644
--- a/src/router_core/terminus.c
+++ b/src/router_core/terminus.c
@@ -187,26 +187,29 @@ qd_iterator_t *qdr_terminus_dnp_address(qdr_terminus_t *term)
 
 void qdr_terminus_set_dnp_address_iterator(qdr_terminus_t *term, qd_iterator_t *iter)
 {
-    char       buffer[1000];
+    char       buffer[1001];
     char      *text    = buffer;
     bool       on_heap = false;
     pn_data_t *old     = term->properties;
+    size_t     len;
 
     if (!old)
         return;
 
-    if (qd_iterator_length(iter) < 1000)
-        qd_iterator_ncopy(iter, (unsigned char*) text, 1000);
-    else {
+    if (qd_iterator_length(iter) < 1000) {
+        len = qd_iterator_ncopy(iter, (unsigned char*) text, 1000);
+        text[len] = '\0';
+    } else {
         text    = (char*) qd_iterator_copy(iter);
         on_heap = true;
+        len = strlen(text);
     }
 
     pn_data_t *new = pn_data(pn_data_size(old));
     pn_data_put_map(new);
     pn_data_enter(new);
     pn_data_put_symbol(new, pn_bytes(strlen(QD_DYNAMIC_NODE_PROPERTY_ADDRESS), QD_DYNAMIC_NODE_PROPERTY_ADDRESS));
-    pn_data_put_string(new, pn_bytes(strlen(text), text));
+    pn_data_put_string(new, pn_bytes(len, text));
     pn_data_exit(new);
 
     term->properties = new;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[2/2] qpid-dispatch git commit: DISPATCH-601 - Increased timeout and removed one test under valgrind

Posted by tr...@apache.org.
DISPATCH-601 - Increased timeout and removed one test under valgrind


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/fcc370e6
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/fcc370e6
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/fcc370e6

Branch: refs/heads/master
Commit: fcc370e66667d8e3ac62d3bd7f057bbbfdfc38de
Parents: f27b010
Author: Ted Ross <tr...@redhat.com>
Authored: Wed Jan 4 12:41:44 2017 -0500
Committer: Ted Ross <tr...@redhat.com>
Committed: Wed Jan 4 12:41:44 2017 -0500

----------------------------------------------------------------------
 tests/system_tests_http.py       | 3 +++
 tests/system_tests_one_router.py | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/fcc370e6/tests/system_tests_http.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_http.py b/tests/system_tests_http.py
index 8ae1b82..2dfc93d 100644
--- a/tests/system_tests_http.py
+++ b/tests/system_tests_http.py
@@ -19,6 +19,7 @@
 
 import unittest, os, json, threading, sys, ssl, urllib2
 import ssl
+import run
 from subprocess import PIPE, Popen, STDOUT
 from system_test import TestCase, Qdrouterd, main_module, DIR, TIMEOUT, Process
 from qpid_dispatch.management.client import Node
@@ -82,6 +83,8 @@ class RouterTestHttp(TestCase):
         self.assertRaises(urllib2.URLError, urllib2.urlopen, "https://localhost:%d/nosuch" % r.ports[0])
 
     def test_https_get(self):
+        if run.use_valgrind(): self.skipTest("too slow for valgrind")
+
         def listener(**kwargs):
             args = dict(kwargs)
             args.update({'port': self.get_port(), 'httpRoot': os.path.dirname(__file__)})

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/fcc370e6/tests/system_tests_one_router.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_one_router.py b/tests/system_tests_one_router.py
index 2c0dce9..0810105 100644
--- a/tests/system_tests_one_router.py
+++ b/tests/system_tests_one_router.py
@@ -1456,7 +1456,7 @@ class BatchedSettlementTest(MessagingHandler):
         self.conn.close()
 
     def on_start(self, event):
-        self.timer    = event.reactor.schedule(20, Timeout(self))
+        self.timer    = event.reactor.schedule(120, Timeout(self)) # Long timeout for Valgrind
         self.conn     = event.container.connect(self.address)
         self.sender   = event.container.create_sender(self.conn, self.dest)
         self.receiver = event.container.create_receiver(self.conn, self.dest)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org