mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-27 11:43:34 +08:00
Update.
2003-06-18 Ulrich Drepper <drepper@redhat.com> * intl/localealias.c (read_alias_file): Determine whether line is read incompletely early, before we modify the line.
This commit is contained in:
parent
2216362439
commit
fae49c6287
@ -1,3 +1,8 @@
|
|||||||
|
2003-06-18 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* intl/localealias.c (read_alias_file): Determine whether line is
|
||||||
|
read incompletely early, before we modify the line.
|
||||||
|
|
||||||
2003-06-17 Jakub Jelinek <jakub@redhat.com>
|
2003-06-17 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela)
|
* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Handle aliases for locale names.
|
/* Handle aliases for locale names.
|
||||||
Copyright (C) 1995-1999, 2000,01,02 Free Software Foundation, Inc.
|
Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -243,11 +243,15 @@ read_alias_file (fname, fname_len)
|
|||||||
char *alias;
|
char *alias;
|
||||||
char *value;
|
char *value;
|
||||||
char *cp;
|
char *cp;
|
||||||
|
int complete_line;
|
||||||
|
|
||||||
if (FGETS (buf, sizeof buf, fp) == NULL)
|
if (FGETS (buf, sizeof buf, fp) == NULL)
|
||||||
/* EOF reached. */
|
/* EOF reached. */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* Determine whether the line is complete. */
|
||||||
|
complete_line = strchr (buf, '\n') != NULL;
|
||||||
|
|
||||||
cp = buf;
|
cp = buf;
|
||||||
/* Ignore leading white space. */
|
/* Ignore leading white space. */
|
||||||
while (isspace ((unsigned char) cp[0]))
|
while (isspace ((unsigned char) cp[0]))
|
||||||
@ -334,11 +338,13 @@ read_alias_file (fname, fname_len)
|
|||||||
|
|
||||||
/* Possibly not the whole line fits into the buffer. Ignore
|
/* Possibly not the whole line fits into the buffer. Ignore
|
||||||
the rest of the line. */
|
the rest of the line. */
|
||||||
while (strchr (buf, '\n') == NULL)
|
if (! complete_line)
|
||||||
|
do
|
||||||
if (FGETS (buf, sizeof buf, fp) == NULL)
|
if (FGETS (buf, sizeof buf, fp) == NULL)
|
||||||
/* Make sure the inner loop will be left. The outer loop
|
/* Make sure the inner loop will be left. The outer loop
|
||||||
will exit at the `feof' test. */
|
will exit at the `feof' test. */
|
||||||
break;
|
break;
|
||||||
|
while (strchr (buf, '\n') == NULL)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Should we test for ferror()? I think we have to silently ignore
|
/* Should we test for ferror()? I think we have to silently ignore
|
||||||
|
Loading…
Reference in New Issue
Block a user