mirror of
https://github.com/ceph/ceph
synced 2025-03-06 08:20:12 +00:00
encoding: fix iterator use for struct_len copy_in
The end() iterator position does not record an offset when the list is modified. Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
This commit is contained in:
parent
36d42deab8
commit
bd518e998c
@ -656,8 +656,9 @@ inline void decode(std::deque<T>& ls, bufferlist::iterator& p)
|
||||
::encode(struct_v, bl); \
|
||||
::encode(struct_compat, bl); \
|
||||
__le32 struct_len = 0; \
|
||||
buffer::list::iterator struct_len_it = bl.end(); \
|
||||
::encode(struct_len, bl); \
|
||||
buffer::list::iterator struct_len_it = bl.end(); \
|
||||
struct_len_it.advance(-4); \
|
||||
do {
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user