diff options
Diffstat (limited to 'xlators/protocol/server/src/server-rpc-fops.c')
| -rw-r--r-- | xlators/protocol/server/src/server-rpc-fops.c | 9 | 
1 files changed, 9 insertions, 0 deletions
diff --git a/xlators/protocol/server/src/server-rpc-fops.c b/xlators/protocol/server/src/server-rpc-fops.c index 915e166223c..c5015befa7e 100644 --- a/xlators/protocol/server/src/server-rpc-fops.c +++ b/xlators/protocol/server/src/server-rpc-fops.c @@ -2201,6 +2201,15 @@ server_compound_cbk (call_frame_t *frame, void *cookie, xlator_t *this,                          STACK_ERR_XL_NAME (frame->root));          } +        /* TODO: I assume a single 10MB payload is large, if not, we need to +           agree to valid payload */ +        if ((args_cbk->fop_length <= 0) || +            ((args_cbk->fop_length > (10 * 1024 * 1024)))) { +                op_ret = -1; +                op_errno = EINVAL; +                goto out; +        } +          rsp.compound_rsp_array.compound_rsp_array_val = GF_CALLOC                                                          (args_cbk->fop_length,                                                           sizeof (compound_rsp),  | 
