diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-09-30 11:35:54 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-09-30 11:35:54 +0200 |
commit | 50e6d42c1967cbd3b07441876af2a7ff2bbbf63f (patch) | |
tree | b55053eb25d07e976426945519d94dc93aa8b4f3 /shell/ash.c | |
parent | b6838b520afa8346751577cd7ccbe0b906cd3a52 (diff) | |
download | busybox-w32-50e6d42c1967cbd3b07441876af2a7ff2bbbf63f.tar.gz busybox-w32-50e6d42c1967cbd3b07441876af2a7ff2bbbf63f.tar.bz2 busybox-w32-50e6d42c1967cbd3b07441876af2a7ff2bbbf63f.zip |
ash: Avoid overflow for very long variable name
Upstream commit:
Date: Tue, 3 Jul 2012 17:32:33 +0800
Avoid overflow for very long variable name
Otherwise, this:
$ perl -le 'print "v"x(2**31+1) ."=1"' | dash
provokes integer overflow
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 59905aa7b..a1b211ae0 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -11274,7 +11274,7 @@ readtoken1(int c, int syntax, char *eofmark, int striptabs) | |||
11274 | /* NB: syntax parameter fits into smallint */ | 11274 | /* NB: syntax parameter fits into smallint */ |
11275 | /* c parameter is an unsigned char or PEOF or PEOA */ | 11275 | /* c parameter is an unsigned char or PEOF or PEOA */ |
11276 | char *out; | 11276 | char *out; |
11277 | int len; | 11277 | size_t len; |
11278 | char line[EOFMARKLEN + 1]; | 11278 | char line[EOFMARKLEN + 1]; |
11279 | struct nodelist *bqlist; | 11279 | struct nodelist *bqlist; |
11280 | smallint quotef; | 11280 | smallint quotef; |