Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void p3d_interp(const SkScalar src[3],
- SkScalar dst[3], SkScalar t) {
- SkScalar ab = SkScalarInterp(src[0], src[3], t);
- SkScalar bc = SkScalarInterp(src[3], src[6], t);
- dst[0] = ab;
- dst[3] = SkScalarInterp(ab, bc, t);
- dst[6] = bc;
- }
- void SkConic::chopAt(SkScalar t, SkConic dst[2]) const {
- SkP3D tmp[3], tmp2[3];
- ratquad_mapTo3D(fPts, fW, tmp);
- p3d_interp(&tmp[0].fX, &tmp2[0].fX, t);
- p3d_interp(&tmp[0].fY, &tmp2[0].fY, t);
- p3d_interp(&tmp[0].fZ, &tmp2[0].fZ, t);
- ....
- }
- This suspicious code was found in Skia project by PVS-Studio static code analyzer.
- Warning message is:
- V557 Array overrun is possible. The '3' index is pointing beyond array bound. skgeometry.cpp 1480
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement