diff options
| -rw-r--r-- | drivers/sbus/char/oradax.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/sbus/char/oradax.c b/drivers/sbus/char/oradax.c index 03dc04739225..c44d7c7ffc92 100644 --- a/drivers/sbus/char/oradax.c +++ b/drivers/sbus/char/oradax.c | |||
| @@ -880,7 +880,7 @@ static int dax_ccb_exec(struct dax_ctx *ctx, const char __user *buf, | |||
| 880 | dax_dbg("args: ccb_buf_len=%ld, idx=%d", count, idx); | 880 | dax_dbg("args: ccb_buf_len=%ld, idx=%d", count, idx); |
| 881 | 881 | ||
| 882 | /* for given index and length, verify ca_buf range exists */ | 882 | /* for given index and length, verify ca_buf range exists */ |
| 883 | if (idx + nccbs >= DAX_CA_ELEMS) { | 883 | if (idx < 0 || idx > (DAX_CA_ELEMS - nccbs)) { |
| 884 | ctx->result.exec.status = DAX_SUBMIT_ERR_NO_CA_AVAIL; | 884 | ctx->result.exec.status = DAX_SUBMIT_ERR_NO_CA_AVAIL; |
| 885 | return 0; | 885 | return 0; |
| 886 | } | 886 | } |
