summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/protocol/server/src/server-protocol.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/protocol/server/src/server-protocol.c b/xlators/protocol/server/src/server-protocol.c
index d9229e0d8c3..0528699acbe 100644
--- a/xlators/protocol/server/src/server-protocol.c
+++ b/xlators/protocol/server/src/server-protocol.c
@@ -6121,6 +6121,9 @@ server_decode_groups (call_frame_t *frame, gf_hdr_common_t *hdr)
if (frame->root->ngrps == 0)
return 0;
+ if (frame->root->ngrps > GF_REQUEST_MAXGROUPS)
+ return -1;
+
for (; i < frame->root->ngrps; ++i)
frame->root->groups[i] = ntoh32 (hdr->req.groups[i]);