Skip to content

Commit 2e17251

Browse files
committed
calib3d: fix invalid memory access
1 parent 3f102e5 commit 2e17251

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/calib3d/src/stereobm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ prefilterXSobel( const Mat& src, Mat& dst, int ftzero )
227227
v_int16x8 ftz2 = v_setall_s16((short)(ftzero*2));
228228
v_int16x8 z = v_setzero_s16();
229229

230-
for(; x <= size.width-8; x += 8 )
230+
for(; x <= (size.width - 1) - 8; x += 8 )
231231
{
232232
v_int16x8 s00 = v_reinterpret_as_s16(v_load_expand(srow0 + x + 1));
233233
v_int16x8 s01 = v_reinterpret_as_s16(v_load_expand(srow0 + x - 1));

0 commit comments

Comments
 (0)