Fixed assertion failure related to shared_buf_t boundary check.