From: Matt Benjamin Date: Fri, 15 Mar 2019 22:34:28 +0000 (-0400) Subject: rgw: fix signed char truncation in delimiter check X-Git-Tag: v15.0.0~216^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=9d7a2873fe719aa16d7d70ef35173429eef90b12;p=ceph-ci.git rgw: fix signed char truncation in delimiter check Fixes: https://tracker.ceph.com/issues/24821 Signed-off-by: Matt Benjamin --- 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;