diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2009-11-23 17:02:20 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2009-11-23 17:02:20 +0000 |
commit | e92d0abecfb11884e85a53f81966c66e5319942d (patch) | |
tree | b60bc08b2ed4b28621ede6b89fb6de2d24145665 /newlib/libc/include/sys | |
parent | 27bbefdefd339676bee4238e996df70e89fcdfa1 (diff) | |
download | cygnal-e92d0abecfb11884e85a53f81966c66e5319942d.tar.gz cygnal-e92d0abecfb11884e85a53f81966c66e5319942d.tar.bz2 cygnal-e92d0abecfb11884e85a53f81966c66e5319942d.zip |
Use NetBSD fix for CVE-2009-0689 security vulnerability.
* libc/include/sys/reent.h (_Kmax): Define here based on the sizeof
size_t, as in latest NetBSD.
* libc/reent/reent.c (_reclaim_reent): Use _Kmax rather than constant
value 15.
* libc/stdlib/mprec.c (_Kmax): Don't define here. Explain why.
Diffstat (limited to 'newlib/libc/include/sys')
-rw-r--r-- | newlib/libc/include/sys/reent.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h index 60eb208a7..ed3d9aa01 100644 --- a/newlib/libc/include/sys/reent.h +++ b/newlib/libc/include/sys/reent.h @@ -800,6 +800,11 @@ struct _reent #endif /* !_REENT_SMALL */ +/* This value is used in stdlib/misc.c. reent/reent.c has to know it + as well to make sure the freelist is correctly free'd. Therefore + we define it here, rather than in stdlib/misc.c, as before. */ +#define _Kmax (sizeof (size_t) << 3) + /* * All references to struct _reent are via this pointer. * Internally, newlib routines that need to reference it should use _REENT. |