Opened 15 years ago
Closed 15 years ago
#969 closed Bugs (fixed)
basic_binary_iprimitive::load_binary bug
| Reported by: | anonymous | Owned by: | Robert Ramey |
|---|---|---|---|
| Milestone: | Component: | serialization | |
| Version: | Severity: | Problem | |
| Keywords: | Cc: |
Description
boost\archive\basic_binary_iprimitive.hpp, line 163, line 174. Now code:
if(count != static_cast<std::size_t>(s))
...
if(count != 1)
Need:
if(scount != static_cast<std::size_t>(s))
...
if(scount != 1)
Change History (3)
comment:1 by , 15 years ago
| Owner: | set to |
|---|
comment:2 by , 15 years ago
comment:3 by , 15 years ago
| Resolution: | → fixed |
|---|---|
| Severity: | Showstopper → Problem |
| Status: | new → closed |
I'll put this in.
Note:
See TracTickets
for help on using tickets.

There is another bug in this function that causes the test
void BoostBinaryWArchiveBug() { const std::string srcValue("12345"); std::string dstValue; std::wostringstream os; boost::archive::binary_woarchive(os) << srcValue; std::wistringstream is(os.str()); boost::archive::binary_wiarchive(is) >> dstValue; BOOST_CHECK_EQUAL(srcValue, dstValue); }to fail with the error message
I found that bug in version 1.33.1, but the problem seems to still be present in 1.34.1. The bug is fixed by changing the memcpy-line from
to