]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: fix signed char truncation in delimiter check
authorMatt Benjamin <mbenjamin@redhat.com>
Fri, 15 Mar 2019 22:34:28 +0000 (18:34 -0400)
committerMatt Benjamin <mbenjamin@redhat.com>
Fri, 15 Mar 2019 22:34:28 +0000 (18:34 -0400)
Fixes: https://tracker.ceph.com/issues/24821
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/rgw_rados.cc

index 7ae743acadcc08c7499fcc5056a99b6ed836e177..1468457a3cb0e604c8437510700db46250a673cd 100644 (file)
@@ -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;