Depending n the value of `len`, the left-over loop might end up
writing/reading out-of-bounds, therefore corrupting the memory.
Change-Id: I1b0bb300f3e5ea668b585266e1aa6af7f93a5d1e
Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4290
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Manuel Bottini <manuel.bottini@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
pdst += step;
}
- for(; len >= 0; --len)
+ for(; len > 0; --len)
{
*pdst++ = std::floor(*psrc++);
}
pdst += step;
}
- for(; len >= 0; --len)
+ for(; len > 0; --len)
{
*pdst++ = std::floor(*psrc++);
}