about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-04-18 03:53:53 -0400
committerRich Felker <dalias@aerifal.cx>2012-04-18 03:53:53 -0400
commit1ff3e6fa2573ece62c53d7e22563a94f8398d0e1 (patch)
tree07ff428b591bab8d00cda9feb964846eb415426c
parentbdeb184c3d08ea5017e1570e0f0431e9d7fd02fd (diff)
downloadmusl-1ff3e6fa2573ece62c53d7e22563a94f8398d0e1.tar.gz
musl-1ff3e6fa2573ece62c53d7e22563a94f8398d0e1.tar.xz
musl-1ff3e6fa2573ece62c53d7e22563a94f8398d0e1.zip
fix typo in exponent reading code or floats
this was basically harmless, but could have resulted in misreading
inputs with more than a few gigabytes worth of digits..
-rw-r--r--src/internal/floatscan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/internal/floatscan.c b/src/internal/floatscan.c
index da209e27..32175431 100644
--- a/src/internal/floatscan.c
+++ b/src/internal/floatscan.c
@@ -44,7 +44,7 @@ static long long scanexp(FILE *f, int pok)
 	}
 	for (x=0; c-'0'<10U && x<INT_MAX/10; c = shgetc(f))
 		x = 10*x + c-'0';
-	for (y=x; c-'0'<10U && x<LLONG_MAX/100; c = shgetc(f))
+	for (y=x; c-'0'<10U && y<LLONG_MAX/100; c = shgetc(f))
 		y = 10*y + c-'0';
 	for (; c-'0'<10U; c = shgetc(f));
 	shunget(f);