From cda2707dc39059de1c459d3ef520a41b5b0fdce8 Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Tue, 30 Oct 2012 15:45:50 +0100
Subject: [PATCH] shared: "max" in the string->number conversion is meant to be
inclusive (cherry picked from commit
8511dd1871fdea1ba0c63baa5becf0ede1658007)
---
src/shared/util.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/util.h b/src/shared/util.h
index a3f6d9f..6125c21 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -336,7 +336,7 @@ unsigned long long random_ull(void);
if (name##_table[i] && \
streq(name##_table[i], s)) \
return i; \
- if (safe_atou(s, &u) >= 0 && u < max) \
+ if (safe_atou(s, &u) >= 0 && u <= max) \
return (type) u; \
return (type) -1; \
} \