mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
Update.
* stdio-common/vfscanf.c: Fix handling of %l[]. Reported by Mitsuru Chinen <mchinen@yamato.ibm.com>.
This commit is contained in:
parent
30c8be92a3
commit
bed381426f
@ -1,5 +1,8 @@
|
||||
2001-08-22 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* stdio-common/vfscanf.c: Fix handling of %l[].
|
||||
Reported by Mitsuru Chinen <mchinen@yamato.ibm.com>.
|
||||
|
||||
* elf/dl-addr.c (_dl_addr): Fix tests to determine dli_sname.
|
||||
* malloc/mtrace.c (tr_where): dli_sname always points to a
|
||||
non-empty string if != NULL.
|
||||
|
@ -2090,19 +2090,18 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
|
||||
size_t n;
|
||||
|
||||
/* Convert it into a wide character. */
|
||||
n = __mbrtowc (wstr, buf, cnt, &cstate);
|
||||
buf[0] = c;
|
||||
n = __mbrtowc (wstr, buf, 1, &cstate);
|
||||
|
||||
if (n == (size_t) -2)
|
||||
{
|
||||
/* Possibly correct character, just not enough
|
||||
input. */
|
||||
++cnt;
|
||||
assert (cnt < MB_CUR_MAX);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (n != cnt)
|
||||
encode_error ();
|
||||
|
||||
++wstr;
|
||||
if ((flags & MALLOC)
|
||||
&& wstr == (wchar_t *) *strptr + strsize)
|
||||
|
Loading…
Reference in New Issue
Block a user