]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: off-by-one in rgw_trim_whitespace()
authorRay Lv <xiangyulv@gmail.com>
Wed, 26 Feb 2014 13:17:32 +0000 (21:17 +0800)
committerYehuda Sadeh <yehuda@inktank.com>
Mon, 3 Mar 2014 16:51:30 +0000 (08:51 -0800)
Fixes: #7543
Backport: dumpling

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Signed-off-by: Ray Lv <raylv@yahoo-inc.com>
src/rgw/rgw_common.cc

index 50b0eaf32bf379a341034509fd286819786444c1..e413a45095397ecbf4ae7b7fa036aad52c40c7c5 100644 (file)
@@ -793,7 +793,7 @@ string rgw_trim_whitespace(const string& src)
   }
 
   int end = src.size() - 1;
-  if (end <= start) {
+  if (end < start) {
     return string();
   }