зеркало из https://github.com/github/ruby.git
* bignum.c (bigand_int): Fix a buffer over read.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
5026d0ae75
Коммит
3ade5353e1
|
@ -1,3 +1,7 @@
|
|||
Wed Jun 26 07:27:17 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* bignum.c (bigand_int): Fix a buffer over read.
|
||||
|
||||
Wed Jun 26 06:48:07 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* bignum.c (bigadd_int): Fix a buffer over read.
|
||||
|
|
11
bignum.c
11
bignum.c
|
@ -4651,13 +4651,10 @@ bigand_int(VALUE x, long y)
|
|||
i = 1;
|
||||
zds[0] = xds[0] & y;
|
||||
#else
|
||||
{
|
||||
long num = y;
|
||||
|
||||
for (i=0; i<bdigit_roomof(SIZEOF_LONG); i++) {
|
||||
zds[i] = xds[i] & BIGLO(num);
|
||||
num = BIGDN(num);
|
||||
}
|
||||
for (i=0; i < xn; i++) {
|
||||
if (y == 0 || y == -1) break;
|
||||
zds[i] = xds[i] & BIGLO(y);
|
||||
y = BIGDN(y);
|
||||
}
|
||||
#endif
|
||||
while (i < xn) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче