diff options
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/rpc-lib/src/rpc-transport.h | 2 | ||||
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/rpc/rpc-lib/src/rpc-transport.h b/rpc/rpc-lib/src/rpc-transport.h index 117d5e1e8ce..2beff0822a2 100644 --- a/rpc/rpc-lib/src/rpc-transport.h +++ b/rpc/rpc-lib/src/rpc-transport.h @@ -163,7 +163,7 @@ typedef struct rpc_request_info rpc_request_info_t; struct rpc_transport_pollin { - struct iovec vector[2]; + struct iovec vector[MAX_IOVEC]; int count; char vectored; void *private; diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c index b19a905692d..a8a09048a44 100644 --- a/rpc/rpc-lib/src/rpcsvc.c +++ b/rpc/rpc-lib/src/rpcsvc.c @@ -401,9 +401,9 @@ rpcsvc_request_init (rpcsvc_t *svc, rpc_transport_t *trans, req->msg[0] = progmsg; req->iobref = iobref_ref (msg->iobref); if (msg->vectored) { - /* msg->vector[2] is defined in structure. prevent a + /* msg->vector[MAX_IOVEC] is defined in structure. prevent a out of bound access */ - for (i = 1; i < min (msg->count, 2); i++) { + for (i = 1; i < min (msg->count, MAX_IOVEC); i++) { req->msg[i] = msg->vector[i]; } } |