mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
allocate temp array big enough for not to worry about bound checking in look-aheads
This commit is contained in:
parent
023314bc5f
commit
8b33a4536d
1 changed files with 1 additions and 0 deletions
|
@ -1362,6 +1362,7 @@ static int do_div_mod(decimal *from1, decimal *from2,
|
|||
*buf0++=0;
|
||||
|
||||
len1=(i=ROUND_UP(prec1))+ROUND_UP(2*frac2+scale_incr+1);
|
||||
set_if_bigger(len1, 3);
|
||||
if (!(tmp1=my_alloca(len1*sizeof(dec1))))
|
||||
return E_DEC_OOM;
|
||||
memcpy(tmp1, buf1, i*sizeof(dec1));
|
||||
|
|
Loading…
Reference in a new issue