| Summary: | Missing pointer increment in wcsspn result in eternal loop | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Goran Lowkrantz <goran.lowkrantz> | ||||
| Component: | bin | Assignee: | Dag-Erling Smørgrav <des> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | 4.3-STABLE | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
State Changed From-To: open->feedback Fixed in -CURRENT. Responsible Changed From-To: freebsd-bugs->des I'll handle the MFC. State Changed From-To: feedback->closed MFCed. |
In the libc function wcsspn, the search set pointer is not incremented. As a result, any call to this function results in an eternal loop. How-To-Repeat: #include <cwchar> #include <iostream> int main(int argc, char* argv[]) { wchar_t * x = L"abcdefghijkabcdefghijk"; size_t y = wcsspn(x, L"abcdf"); cerr << y << endl; y = wcsspn(x, L"mno"); cerr << y << endl; return 0; }