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/02/16 09:54:30 UTC

qpid-proton git commit: PROTON-1359: Make sure we don't try and read past the end of buffer - For ARRAY32, LIST32 & MAP32 types

Repository: qpid-proton
Updated Branches:
  refs/heads/master 7560f58ea -> cd612ffec


PROTON-1359: Make sure we don't try and read past the end of buffer
- For ARRAY32, LIST32 & MAP32 types


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

Branch: refs/heads/master
Commit: cd612ffecc0b41a0765ffbb48dd6bd4467ff4879
Parents: 7560f58
Author: Andrew Stitcher <as...@apache.org>
Authored: Thu Feb 16 04:44:27 2017 -0500
Committer: Andrew Stitcher <as...@apache.org>
Committed: Thu Feb 16 04:44:27 2017 -0500

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


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/cd612ffe/proton-c/src/core/decoder.c
----------------------------------------------------------------------
diff --git a/proton-c/src/core/decoder.c b/proton-c/src/core/decoder.c
index b0c8d79..fc01767 100644
--- a/proton-c/src/core/decoder.c
+++ b/proton-c/src/core/decoder.c
@@ -373,6 +373,7 @@ static int pni_decoder_decode_value(pn_decoder_t *decoder, pn_data_t *data, uint
     case PNE_ARRAY32:
     case PNE_LIST32:
     case PNE_MAP32:
+      if (pn_decoder_remaining(decoder) < 8) return PN_UNDERFLOW;
       size = pn_decoder_readf32(decoder);
       count = pn_decoder_readf32(decoder);
       break;


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