qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject [18/38] qpid-proton git commit: PROTON-1359: Make sure we don't try and read past the end of buffer - For ARRAY32, LIST32 & MAP32 types
Date Thu, 23 Feb 2017 22:51:25 GMT
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/go1
Commit: cd612ffecc0b41a0765ffbb48dd6bd4467ff4879
Parents: 7560f58
Author: Andrew Stitcher <astitcher@apache.org>
Authored: Thu Feb 16 04:44:27 2017 -0500
Committer: Andrew Stitcher <astitcher@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


Mime
View raw message