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:
Diffstat (limited to 'newlib/libc/locale/ldpart.c')
-rw-r--r--newlib/libc/locale/ldpart.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/newlib/libc/locale/ldpart.c b/newlib/libc/locale/ldpart.c
index 35ad3bd13..595532298 100644
--- a/newlib/libc/locale/ldpart.c
+++ b/newlib/libc/locale/ldpart.c
@@ -110,7 +110,7 @@ __part_load_locale(const char *name,
goto bad_locale;
if (st.st_size <= 0)
goto bad_locale;
- bufsize = namesize + st.st_size + 1;
+ bufsize = namesize + st.st_size;
locale_buf = NULL;
if (lbuf == NULL || lbuf == locale_buf_C)
@@ -137,7 +137,6 @@ __part_load_locale(const char *name,
/*
* Parse the locale file into localebuf.
*/
- p[st.st_size] = '\0';
if (plim[-1] != '\n')
goto bad_lbuf;
num_lines = split_lines(p, plim);