[Xorp-cvs] XORP cvs commit: xorp/libxorp
Bruce Simpson
bms at icir.org
Mon May 5 03:45:54 PDT 2008
CVSROOT: /usr/local/www/data/cvs
Module name: xorp
Changes by: bms at chum.icir.org 2008-05-05 10:45:54 UTC
XORP CVS repository
Modified files:
libxorp buffered_asyncio.cc
Log message:
Fix incorrect STL container usage.
BufferedAsyncReader::set_reserve_bytes() is a method which may cause
its internal buffer, implemented as a std::vector, to be resized. Pointers
to elements of a std::vector are NOT guaranteed to remain valid after
the resize() method is called.
std::vector::resize() guarantees that elements are copied even if the
storage is reallocated by the default allocator. Therefore, cache the
_config.head pointer as an index before calling it, and restore after.
Bugzilla URL: http://bugzilla.xorp.org/bugzilla/show_bug.cgi?id=750
Revision Changes Path
1.14 +4 -1; commitid: 63fa481ee55541a7; xorp/libxorp/buffered_asyncio.cc
More information about the Xorp-cvs
mailing list