mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
rgw: off-by-one in rgw_trim_whitespace()
Fixes: #7543 Backport: dumpling Reviewed-by: Yehuda Sadeh <yehuda@inktank.com> Signed-off-by: Ray Lv <raylv@yahoo-inc.com>
This commit is contained in:
parent
ffdfb846a2
commit
195d53a7fc
@ -793,7 +793,7 @@ string rgw_trim_whitespace(const string& src)
|
||||
}
|
||||
|
||||
int end = src.size() - 1;
|
||||
if (end <= start) {
|
||||
if (end < start) {
|
||||
return string();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user