Fixed input buffer read overflow in vectorized G-API convertTo implementation.

This commit is contained in:
Alexander Smorkalov 2024-06-18 15:44:26 +03:00
parent e3884a9ea8
commit 553c111c5a

View File

@ -2915,7 +2915,7 @@ CV_ALWAYS_INLINE
typename std::enable_if<DST_SHORT_OR_USHORT, void>::type typename std::enable_if<DST_SHORT_OR_USHORT, void>::type
convertto_simd_nocoeff_impl(const uchar* inx, DST* outx) convertto_simd_nocoeff_impl(const uchar* inx, DST* outx)
{ {
v_uint8 a = vx_load(inx); v_uint8 a = vx_load_low(inx);
v_uint16 res = v_expand_low(a); v_uint16 res = v_expand_low(a);
store_i16(outx, res); store_i16(outx, res);