boostorg / boostorg/iostreams

Incorrect base pointer after sync operation

Open
#92 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
48
Forks
124
PR merge metrics
No merged PRs in 30d

Description

In the else condition of [indirect_streambuf::sync_impl()](https://github.com/boostorg/iostreams/blob/a31d9de40c957d676a4e9464ab9c6bbc963a9af8/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp#L411), pbase is not correctly set if data has been left in the out buffer during previous sync operations. I suggest to use `setp(pbase() + amt, out().end());` instead.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.