array.size is only 32bit so it is not safe to multiply it
up before casting to (long long).
Actually, we shouldn't be using array.size here at all, but that
will get fixed in a subsequent patch.
Reported-by: Andrew Burgess <aab@cichlid.com>
Signed-off-by: NeilBrown <neilb@suse.de>
}
/* Check that we can hold all the data */
- size = ndata * array.size;
+ size = ndata * (long long)array.size;
get_dev_size(fd, NULL, &array_size);
if (size < (array_size/1024)) {
fprintf(stderr, Name ": this change will reduce the size of the array.\n"