The information in this article applies to:
SYMPTOMS
When you assign a shorter string to an existing string that originally
contained a longer string, the assignment corrupts the heap.
CAUSEThis problem is due to a bug in the Standard C++ Library basic_string class implementation. When assigning a shorter string to an existing string that originally contained a longer string, the heap is corrupted. The assignment can be done either through operator=() or assign(). RESOLUTIONTo work around the problem, call the string::erase member function before assigning the new value to the existing string. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem was corrected in Visual C++ version 6.0 for Windows. MORE INFORMATIONSteps to Reproduce Behavior
Keywords : kbVC500bug kbVC600fix STLIss |
|
Last Reviewed: July 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |