From 16c5f3c59b9658a807b97dde37e818b08c005d68 Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Tue, 2 Nov 2004 20:45:55 +0100 Subject: [PATCH] allocate temp array big enough for not to worry about bound checking in look-aheads --- strings/decimal.c | 1 + 1 file changed, 1 insertion(+) 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));