You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2017/12/21 14:14:13 UTC

qpid-proton git commit: PROTON-1687/PROTON-1726: Fix crash when using PN_TRACE_RAW - Corrected unsigned subtraction mess.

Repository: qpid-proton
Updated Branches:
  refs/heads/master 0b6de9b70 -> b462433e3


PROTON-1687/PROTON-1726: Fix crash when using PN_TRACE_RAW
- Corrected unsigned subtraction mess.


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

Branch: refs/heads/master
Commit: b462433e375258167caea81e617f437ce512b12f
Parents: 0b6de9b
Author: Andrew Stitcher <as...@apache.org>
Authored: Thu Dec 21 14:10:56 2017 +0000
Committer: Andrew Stitcher <as...@apache.org>
Committed: Thu Dec 21 14:10:56 2017 +0000

----------------------------------------------------------------------
 proton-c/src/core/buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/b462433e/proton-c/src/core/buffer.c
----------------------------------------------------------------------
diff --git a/proton-c/src/core/buffer.c b/proton-c/src/core/buffer.c
index 7bfc813..e990581 100644
--- a/proton-c/src/core/buffer.c
+++ b/proton-c/src/core/buffer.c
@@ -315,6 +315,6 @@ int pn_buffer_quote(pn_buffer_t *buf, pn_string_t *str, size_t n)
     return 0;
   }
   pn_quote(str, buf->bytes + pni_buffer_head(buf), hsize);
-  if (tsize-(n-hsize) > 0) pn_quote(str, buf->bytes, tsize-(n-hsize));
+  pn_quote(str, buf->bytes, pn_min(tsize, n-hsize));
   return 0;
 }


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