File get-poolsize.patch of Package haveged

From 6d52229623c296385813bc8178987cd50fa55193 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@suse.de>
Date: Thu, 25 Jul 2019 11:19:12 +0200
Subject: [PATCH] Fix type mismatch in get_poolsize

Make max_bits signed so that error checking works.
---
 src/haveged.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/haveged.c b/src/haveged.c
index 9788bda..543d833 100644
--- a/src/haveged.c
+++ b/src/haveged.c
@@ -496,7 +496,8 @@ static int get_poolsize(   /* RETURN: number of bits  */
    void)                   /* IN: nothing             */
 {
    FILE *poolsize_fh,*osrel_fh;
-   unsigned int max_bits,major,minor;
+   unsigned int major,minor;
+   int max_bits;
 
    poolsize_fh = fopen(params->poolsize, "rb");
    if (poolsize_fh) {
-- 
2.22.0

openSUSE Build Service is sponsored by