[PATCH] Pass 32 bit unsigned to malloc from pagesize sysconf result

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Steven Dake <sdake@xxxxxxxxxx>
---
 lib/cpg.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/cpg.c b/lib/cpg.c
index 423cea6..a24663e 100644
--- a/lib/cpg.c
+++ b/lib/cpg.c
@@ -718,7 +718,7 @@ memory_map (char *path, const char *file, void **buf, size_t bytes)
 		goto error_close_unlink;
 	}
 	page_size = sysconf(_SC_PAGESIZE);
-	buffer = malloc (page_size);
+	buffer = malloc ((uint32_t)page_size);
 	if (buffer == NULL) {
 		goto error_close_unlink;
 	}
-- 
1.7.6.4

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux