In the file misc2.c, the function coladvance2 has the following code:
int width = curwin->w_width - win_col_off(curwin);
if (finetune
&& curwin->w_p_wrap
&& curwin->w_width != 0
&& wcol >= (colnr_T)width)
{
if (wcol / width > (colnr_T)csize / width)
}
The variable width is used as a divisor but its value can be zero because:
curwin->w_width may be zero, since the code explicitly checks that curwin->w_width != 0win_col_off(curwin) may return zero, refer to the code here.Therefore, I think here we have a potential divide by zero bug.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.![]()
In the file
misc2.c, the functioncoladvance2has the following code:int width = curwin->w_width - win_col_off(curwin); if (finetune && curwin->w_p_wrap && curwin->w_width != 0 && wcol >= (colnr_T)width) { if (wcol / width > (colnr_T)csize / width) }The variable
widthis used as a divisor but its value can be zero because:
curwin->w_widthmay be zero, since the code explicitly checks thatcurwin->w_width != 0
—
You are receiving this because you commented.