summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-04-08 08:04:37 +0000
committerUlrich Drepper <drepper@redhat.com>1998-04-08 08:04:37 +0000
commitcd2bd5915d633f9d526d8d17636054c93cd1580e (patch)
tree919918ee79d0fb0d76dfebb538c6b2a0fda98985
parent279eb600d98131197c732147621e96c2d019bc52 (diff)
downloadglibc-cd2bd5915d633f9d526d8d17636054c93cd1580e.tar.gz
Update.
1998-04-08 Ulrich Drepper <drepper@cygnus.com> * stdio-common/vfscanf.c: Perform test in %l[ handling correctly.
-rw-r--r--ChangeLog4
-rw-r--r--stdio-common/vfscanf.c11
2 files changed, 6 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 1a3e5b8dca..00e30571e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+1998-04-08 Ulrich Drepper <drepper@cygnus.com>
+
+ * stdio-common/vfscanf.c: Perform test in %l[ handling correctly.
+
1998-04-07 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/_G_config.h (_G_stat64): Define to
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
index 8ed56b3c08..48bcf6f5fd 100644
--- a/stdio-common/vfscanf.c
+++ b/stdio-common/vfscanf.c
@@ -1095,16 +1095,9 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
{
size_t cnt = 0;
NEXT_WIDE_CHAR (first);
- if (val > 255 || wp[val] == not_in)
+ if (val <= 255 && wp[val] == not_in)
{
- /* XXX We have a problem here. We read a wide
- character and this possibly took several
- bytes. But we can only push back one single
- character. To be sure we don't create wrong
- input we push it back only in case it is
- representable within one byte. */
- if (val < 0x80)
- ungetc (val, s);
+ ungetc (val, s);
break;
}
STRING_ADD_CHAR (wstr, val, wchar_t);