From 3ca5a21a9c02bdebe2d95268482031f002efcf23 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 29 May 2014 11:23:23 +0300 Subject: [PATCH] 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 Signed-off-by: Mike Snitzer --- Reading git-format-patch failed