diff options
author | unknown <serg@serg.mylan> | 2004-11-02 20:45:55 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-11-02 20:45:55 +0100 |
commit | 8b33a4536dc4b15812601eefee5cfc875357de01 (patch) | |
tree | af8f0f8b0f01c3e7fc02f3915dea5a9c5c850178 /strings | |
parent | 023314bc5f1a079c33849cd2a68f7755d3349eea (diff) | |
download | mariadb-git-8b33a4536dc4b15812601eefee5cfc875357de01.tar.gz |
allocate temp array big enough for not to worry about bound checking in look-aheads
Diffstat (limited to 'strings')
-rw-r--r-- | strings/decimal.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/strings/decimal.c b/strings/decimal.c index d9609ec541c..fc175417839 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -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)); |