Blame SOURCES/openscap-1.3.7-PR-1861-failed-to-check-available-memory.patch

19219b
From 12f9c02a612bb1687676b74a4739126b1913b1fe Mon Sep 17 00:00:00 2001
19219b
From: Ajay Nair <ajaynair59@gmail.com>
19219b
Date: Mon, 9 May 2022 13:31:47 -0400
19219b
Subject: [PATCH] Reset errno before call to strtoll
19219b
19219b
---
19219b
 src/common/memusage.c | 2 ++
19219b
 1 file changed, 2 insertions(+)
19219b
19219b
diff --git a/src/common/memusage.c b/src/common/memusage.c
19219b
index c6755f21f1..ffa70b662b 100644
19219b
--- a/src/common/memusage.c
19219b
+++ b/src/common/memusage.c
19219b
@@ -71,6 +71,8 @@ static int read_common_sizet(void *szp, char *strval)
19219b
 		return (-1);
19219b
 
19219b
 	*end = '\0';
19219b
+
19219b
+	errno = 0;
19219b
 	*(size_t *)szp = strtoll(strval, NULL, 10);
19219b
 
19219b
 	if (errno == EINVAL ||