Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2023-04-26 09:23:04 +0300
committerSebastian Huber <sebastian.huber@embedded-brains.de>2023-04-26 09:23:04 +0300
commite301a74a6f111df4553b50b813a589589d1708b1 (patch)
tree4371ca8a7dd510c764c4c30219832b3a6b9980d6 /newlib/libc/stdio
parentc3798a2f7ddaedd91d5ea76a8adc5a4ee652cffd (diff)
Fix _REENT_EMERGENCY() if TLS is enabled
If the thread-local storage (TLS) support was enabled, the _REENT_EMERGENCY() object had the wrong size. It must be a buffer of length _REENT_EMERGENCY_SIZE and not just a single character.
Diffstat (limited to 'newlib/libc/stdio')
-rw-r--r--newlib/libc/stdio/tmpnam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/stdio/tmpnam.c b/newlib/libc/stdio/tmpnam.c
index 51dfd1cea..dc04cf3f6 100644
--- a/newlib/libc/stdio/tmpnam.c
+++ b/newlib/libc/stdio/tmpnam.c
@@ -84,7 +84,7 @@ The global pointer <<environ>> is also required.
#ifdef _REENT_THREAD_LOCAL
_Thread_local int _tls_inc;
-_Thread_local char _tls_emergency;
+_Thread_local char _tls_emergency[_REENT_EMERGENCY_SIZE];
#endif
/* Try to open the file specified, if it can't be opened then try