Opened 15 years ago

Closed 15 years ago

#1141 closed Bugs (fixed)

Dangerious operator<< for wostream

Reported by: pop.atry@… Owned by: Robert Ramey
Milestone: To Be Determined Component: serialization
Version: Boost 1.34.1 Severity: Problem
Keywords: Cc:

Description

#include <boost/archive/xml_woarchive.hpp>
#include <sstream>
int main()
{
  using namespace std;
  using namespace boost;
  using namespace boost::archive;
  wstringstream s;
  s << ".....................................";
}

The code causes memory corrupt because there is a dangerious operator<< declare in xml_woarchive.hpp.

BOOST_WARCHIVE_DECL(std::wostream &)
operator<<(std::wostream &os, const char *t);

If this operator is only used internal, it should not be exported.

Change History (1)

comment:1 by Robert Ramey, 15 years ago

Resolution: fixed
Status: newclosed

good call. I'm fixing this.

RObert Ramey

Note: See TracTickets for help on using tickets.