about summary refs log tree commit diff
path: root/stdio-common/vfscanf.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-05-22 16:41:59 +0000
committerUlrich Drepper <drepper@redhat.com>2000-05-22 16:41:59 +0000
commit3f651a4de302da8fbe4fb5f6e34f658bf11a8a7c (patch)
treebcde2754d2b573fd268bb9b047e9d9ce32eadd49 /stdio-common/vfscanf.c
parent6aa29abe9fab81e153d6232edf4ba048ac7d0b6e (diff)
downloadglibc-3f651a4de302da8fbe4fb5f6e34f658bf11a8a7c.tar.gz
glibc-3f651a4de302da8fbe4fb5f6e34f658bf11a8a7c.tar.xz
glibc-3f651a4de302da8fbe4fb5f6e34f658bf11a8a7c.zip
Update.
2000-05-22  Jakub Jelinek <jakub@redhat.com>

	* stdio-common/vfscanf.c (__vfscanf): Remove bogus check if '-' is
	not the second character in the range.
	* stdio-common/tstscanf.c (main): Add testcase for the above.
	Reported by jik@kamens.brookline.ma.us.
Diffstat (limited to 'stdio-common/vfscanf.c')
-rw-r--r--stdio-common/vfscanf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
index 0412ca66eb..3ca82cc4c7 100644
--- a/stdio-common/vfscanf.c
+++ b/stdio-common/vfscanf.c
@@ -1657,9 +1657,8 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
 	      ++f;
 	    }
 
-	  tw = (char *) f;
 	  while ((fc = *f++) != '\0' && fc != ']')
-	    if (fc == '-' && *f != '\0' && *f != ']' && f - 2 != tw
+	    if (fc == '-' && *f != '\0' && *f != ']'
 		&& (unsigned char) f[-2] <= (unsigned char) *f)
 	      {
 		/* Add all characters from the one before the '-'