forked from aniani/vim
patch 8.2.3574: divide by zero
Problem: Divide by zero. Solution: Don't check for overflow if multiplicand is zero.
This commit is contained in:
@@ -2014,8 +2014,9 @@ do_put(
|
|||||||
long multlen = count * yanklen;
|
long multlen = count * yanklen;
|
||||||
|
|
||||||
totlen = multlen;
|
totlen = multlen;
|
||||||
if (totlen != multlen || totlen / count != yanklen
|
if (count != 0 && yanklen != 0
|
||||||
|| totlen / yanklen != count)
|
&& (totlen != multlen || totlen / count != yanklen
|
||||||
|
|| totlen / yanklen != count))
|
||||||
{
|
{
|
||||||
emsg(_(e_resulting_text_too_long));
|
emsg(_(e_resulting_text_too_long));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -757,6 +757,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3574,
|
||||||
/**/
|
/**/
|
||||||
3573,
|
3573,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user