IOBuf: Fix Bug in Cloning with Headroom and Tailroom
Summary: If the source IOBuf is not chained, we short-circuit the cloning logic and instead share the existing buffer. This works when we implicitly require the clone to have the same headroom and tailroom requirements as the source IOBuf. However, the API allows setting other values. We need to test that we meet those requirements in order to use the shortcut. This diff adds those checks. Reviewed By: yfeldblum Differential Revision: D18180574 fbshipit-source-id: 31bfaabd7663cf83faf919d8cb242df0a7a2969d
Showing
Please register or sign in to comment