You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2015/03/06 17:49:27 UTC

qpid-proton git commit: PROTON-835: strncmp in pn_data_lookup doesn't work in some cases

Repository: qpid-proton
Updated Branches:
  refs/heads/master 8f810c375 -> 304f6dfda


PROTON-835: strncmp in pn_data_lookup doesn't work in some cases


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

Branch: refs/heads/master
Commit: 304f6dfda72ec8d2f09df0efff3b0c16f2f3782e
Parents: 8f810c3
Author: Alan Conway <ac...@redhat.com>
Authored: Fri Mar 6 11:44:59 2015 -0500
Committer: Alan Conway <ac...@redhat.com>
Committed: Fri Mar 6 11:48:43 2015 -0500

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


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/304f6dfd/proton-c/src/codec/codec.c
----------------------------------------------------------------------
diff --git a/proton-c/src/codec/codec.c b/proton-c/src/codec/codec.c
index 1c4cbeb..3a6feb3 100644
--- a/proton-c/src/codec/codec.c
+++ b/proton-c/src/codec/codec.c
@@ -1331,7 +1331,7 @@ bool pn_data_lookup(pn_data_t *data, const char *name)
     case PN_SYMBOL:
       {
         pn_bytes_t bytes = pn_data_get_bytes(data);
-        if (!strncmp(name, bytes.start, bytes.size)) {
+        if (strlen(name) == bytes.size && !strncmp(name, bytes.start, bytes.size)) {
           return pn_data_next(data);
         }
       }


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