diff options
author | Andreas Schneider <asn@samba.org> | 2015-11-25 12:35:59 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2015-12-01 00:38:23 +0100 |
commit | b3a9b88702c7440c43699255517310ea380a36db (patch) | |
tree | 420b225a180afbb8c510d46f2a1f4266af7d7d6f /librpc/rpc | |
parent | 87f8bddffee554bc9e385e084741525abd2bab79 (diff) | |
download | samba-b3a9b88702c7440c43699255517310ea380a36db.tar.gz |
librpc: Fix a possible array out of bounds access
Reported by gcc 5.1.1.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'librpc/rpc')
-rw-r--r-- | librpc/rpc/binding.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/librpc/rpc/binding.c b/librpc/rpc/binding.c index f131d00a88c..d0acd6e78bb 100644 --- a/librpc/rpc/binding.c +++ b/librpc/rpc/binding.c @@ -1226,7 +1226,7 @@ _PUBLIC_ enum dcerpc_transport_t dcerpc_transport_by_tower(const struct epm_towe continue; } - for (j = 0; j < transports[i].num_protocols; j++) { + for (j = 0; j < transports[i].num_protocols && j < MAX_PROTSEQ; j++) { if (transports[i].protseq[j] != tower->floors[j+2].lhs.protocol) { break; } |