This is the mail archive of the
ecos-bugs@sourceware.org
mailing list for the eCos project.
[Bug 1001390] New: Patch for uSTL's string class misinterpretingnpos
- From: bugzilla-daemon at bugs dot ecos dot sourceware dot org
- To: ecos-bugs at ecos dot sourceware dot org
- Date: Mon, 21 Nov 2011 16:21:08 +0000
- Subject: [Bug 1001390] New: Patch for uSTL's string class misinterpretingnpos
- Auto-submitted: auto-generated
Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001390
Summary: Patch for uSTL's string class misinterpreting npos
Product: eCos
Version: CVS
Platform: All
OS/Version: Other
Status: UNCONFIRMED
Severity: enhancement
Priority: low
Component: uSTL
AssignedTo: unassigned@bugs.ecos.sourceware.org
ReportedBy: fpagliughi@mindspring.com
CC: ecos-bugs@ecos.sourceware.org
Class: Advice Request
Created an attachment (id=1435)
--> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1435)
This patch fixes the ustl::string bug in which it misinterprets npos as a
literal value
This patch fixes a bug in the uSTL string class in which the string::npos
constant is misinterpreted as a literal value in several functions. Thus, a
series like this:
string s1 = "my string";
string s2 = s1.substr(3, string::npos);
should give the value "string" to s2, but, in fact crashes in an attempt to
allocate a string that is several GB long.
This problem was reported to the uSTL site and fixed by them. It should appear
in their next rev (1.6?) but is especially insidious, so could/should go into
the eCos version until such time that we upgrade to a newer uSTL.
--
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.