| Summary: | [patch] wctype.c declares static array on stack | ||
|---|---|---|---|
| Product: | Base System | Reporter: | knut st. osmundsen <bird-freebsd> |
| Component: | bin | Assignee: | Antoine Brodin <antoine> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
Responsible Changed From-To: freebsd-bugs->antoine Take. antoine 2008-03-17 18:22:23 UTC
FreeBSD src repository
Modified files:
lib/libc/locale wctype.c
Log:
Don't allocate the constant array "props" on the stack in wctype.
PR: 74743
Submitted by: knut st. osmundsen
Approved by: rwatson (mentor)
MFC after: 1 month
Revision Changes Path
1.4 +1 -1 src/lib/libc/locale/wctype.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: open->patched Patched in HEAD, thanks. antoine 2008-04-26 17:38:07 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_7)
lib/libc/locale wctype.c
Log:
MFC to RELENG_7:
Don't allocate the constant array "props" on the stack in wctype.
PR: 74743
Submitted by: knut st. osmundsen
Approved by: rwatson (mentor)
MFC after: 1 month
Revision Changes Path
1.3.18.1 +1 -1 src/lib/libc/locale/wctype.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
antoine 2008-04-26 17:39:55 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_6)
lib/libc/locale wctype.c
Log:
MFC to RELENG_6:
Don't allocate the constant array "props" on the stack in wctype.
PR: 74743
Submitted by: knut st. osmundsen
Approved by: rwatson (mentor)
MFC after: 1 month
Revision Changes Path
1.3.8.1 +1 -1 src/lib/libc/locale/wctype.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: patched->closed Close: fix committed in HEAD, RELENG_7 and RELENG_6. Thanks for the report! |
The prop array in int wctype() implementation is instanciated on the stack every call. Sorry if this should be posted elsewhere, but this is my first time on sending a patch. I just happen to come across the code when I shopping code for a OS/2 libc. Fix: wctype_t wctype(const char *property) { - struct { + static const struct { const char *name; wctype_t mask; } props[] = { { "alnum", _CTYPE_A|_CTYPE_D }, { "alpha", _CTYPE_A },--kGq6FqxEU0OCw7umJLIABmM0N3aFbRlhXjKEqn1PpA833gfB Content-Type: text/plain; name="file.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="file.diff" Index: wctype.c =================================================================== RCS file: /home/ncvs/src/lib/libc/locale/wctype.c,v retrieving revision 1.3 diff -u -5 -r1.3 wctype.c --- wctype.c 27 Mar 2004 08:59:21 -0000 1.3 +++ wctype.c 5 Dec 2004 21:27:26 -0000 @@ -40,11 +40,11 @@ } How-To-Repeat: Call wctype().