diff options
Diffstat (limited to 'strings/decimal.c')
-rw-r--r-- | strings/decimal.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/strings/decimal.c b/strings/decimal.c index ea6ac2caf38..f536bdb1d6b 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -1986,7 +1986,11 @@ int decimal_mul(decimal_t *from1, decimal_t *from2, decimal_t *to) carry+=hi; } for (; carry; buf0--) + { + if (buf0 < to->buf) + return E_DEC_OVERFLOW; ADD(*buf0, *buf0, 0, carry); + } } /* Now we have to check for -0.000 case */ |