From 9d7a2873fe719aa16d7d70ef35173429eef90b12 Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Fri, 15 Mar 2019 18:34:28 -0400 Subject: [PATCH] rgw: fix signed char truncation in delimiter check Fixes: https://tracker.ceph.com/issues/24821 Signed-off-by: Matt Benjamin --- src/rgw/rgw_rados.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 7ae743acadc..1468457a3cb 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -2435,7 +2435,7 @@ static inline std::string after_delim(std::string_view delim) char e = delim.back(); delim.remove_suffix(1); std::string result{delim.data(), delim.length()}; - if (e < 255) { + if (uint8_t(e) < 255) { result += char(++e); } else { result += e; -- 2.39.5