Blame SOURCES/0010-Sanity-sbd-md-prevent-unrealistic-overflow-on-sector.patch

04a57c
From f6af36a0fb05b5a37b3dfb153677e28ca5cb3fd8 Mon Sep 17 00:00:00 2001
04a57c
From: Klaus Wenninger <klaus.wenninger@aon.at>
04a57c
Date: Mon, 15 Apr 2019 17:37:42 +0200
04a57c
Subject: [PATCH] Sanity: sbd-md: prevent unrealistic overflow on sector io
04a57c
 calc
04a57c
04a57c
---
04a57c
 src/sbd-md.c | 4 ++--
04a57c
 1 file changed, 2 insertions(+), 2 deletions(-)
04a57c
04a57c
diff --git a/src/sbd-md.c b/src/sbd-md.c
04a57c
index 60a1873..f437c41 100644
04a57c
--- a/src/sbd-md.c
04a57c
+++ b/src/sbd-md.c
04a57c
@@ -162,9 +162,9 @@ sector_io(struct sbd_context *st, int sector, void *data, int rw)
04a57c
 
04a57c
 	memset(&st->io, 0, sizeof(struct iocb));
04a57c
 	if (rw) {
04a57c
-		io_prep_pwrite(&st->io, st->devfd, data, sector_size, sector_size * sector);
04a57c
+		io_prep_pwrite(&st->io, st->devfd, data, sector_size, (long long) sector_size * sector);
04a57c
 	} else {
04a57c
-		io_prep_pread(&st->io, st->devfd, data, sector_size, sector_size * sector);
04a57c
+		io_prep_pread(&st->io, st->devfd, data, sector_size, (long long) sector_size * sector);
04a57c
 	}
04a57c
 
04a57c
 	if (io_submit(st->ioctx, 1, ios) != 1) {
04a57c
-- 
04a57c
1.8.3.1
04a57c