diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-05-29 11:23:23 +0300 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2015-02-09 13:06:48 -0500 |
commit | 3ca5a21a9c02bdebe2d95268482031f002efcf23 (patch) | |
tree | 299c6cd87e488dc5f59449fc5dda1e68ed453007 /drivers/md/dm-log-userspace-base.c | |
parent | 65803c2059832fb99b992728157f7924c2e42d4b (diff) | |
download | talos-op-linux-3ca5a21a9c02bdebe2d95268482031f002efcf23.tar.gz talos-op-linux-3ca5a21a9c02bdebe2d95268482031f002efcf23.zip |
dm raid: fix a couple integer overflows
My static checker complains that if "num_raid_params" is UINT_MAX then
the "if (num_raid_params + 1 > argc) {" check doesn't work as intended.
The other change is that I moved the "if (argc != (num_raid_devs * 2))"
condition forward a few lines so it was before the call to
context_alloc(). If we had an integer overflow inside that function
then it would lead to an immediate crash.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-log-userspace-base.c')
0 files changed, 0 insertions, 0 deletions