aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-05-05 04:15:31 +0000
committerUlrich Drepper <drepper@redhat.com>2007-05-05 04:15:31 +0000
commitb16dba4c527606483050b5ffdaf6e4b2fe97e2f8 (patch)
tree49636a878ab25b671d3ad11958dcc2d9db9512dd
parent42808a34eb131d9962ec439c1399165482a23224 (diff)
downloadglibc-b16dba4c527606483050b5ffdaf6e4b2fe97e2f8.tar
glibc-b16dba4c527606483050b5ffdaf6e4b2fe97e2f8.tar.gz
glibc-b16dba4c527606483050b5ffdaf6e4b2fe97e2f8.tar.bz2
glibc-b16dba4c527606483050b5ffdaf6e4b2fe97e2f8.zip
* locale/programs/linereader.c (get_symname): Fix adding final NUL.
(get_ident): Likewise.
-rw-r--r--ChangeLog5
-rw-r--r--locale/programs/linereader.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e89e7a7407..4f0d27e7f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-04 Ulrich Drepper <drepper@redhat.com>
+
+ * locale/programs/linereader.c (get_symname): Fix adding final NUL.
+ (get_ident): Likewise.
+
2007-05-03 Jakub Jelinek <jakub@redhat.com>
* soft-fp/op-common.h (FP_TRUNC): Replace raising of FP_EX_INEXACT
diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c
index 6587f7305b..4b38fd283c 100644
--- a/locale/programs/linereader.c
+++ b/locale/programs/linereader.c
@@ -523,8 +523,8 @@ get_symname (struct linereader *lr)
{
lr->token.tok = tok_bsymbol;
- buf[bufact] = '\0';
buf = xrealloc (buf, bufact + 1);
+ buf[bufact] = '\0';
lr->token.val.str.startmb = buf;
lr->token.val.str.lenmb = bufact - 1;
@@ -576,8 +576,8 @@ get_ident (struct linereader *lr)
{
lr->token.tok = tok_ident;
- buf[bufact] = '\0';
buf = xrealloc (buf, bufact + 1);
+ buf[bufact] = '\0';
lr->token.val.str.startmb = buf;
lr->token.val.str.lenmb = bufact;