diff options
Diffstat (limited to 'libtransport/src/hicn/transport/utils')
-rw-r--r-- | libtransport/src/hicn/transport/utils/membuf.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libtransport/src/hicn/transport/utils/membuf.h b/libtransport/src/hicn/transport/utils/membuf.h index 5a10d4182..a150483b1 100644 --- a/libtransport/src/hicn/transport/utils/membuf.h +++ b/libtransport/src/hicn/transport/utils/membuf.h @@ -225,6 +225,9 @@ class MemBuf { void trimEnd(std::size_t amount) { length_ -= amount; } + // Never call clear on cloned membuf sharing different + // portions of the same underlying buffer. + // Use the trim functions instead. void clear() { data_ = writableBuffer(); length_ = 0; |