Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#8 DSVL_Helpers.cpp: FlipImageRGB32 crash

v2.71
open
DSVL (1)
5
2008-12-18
2008-01-14
Anonymous
No

The function crash when flip_h=true and flip_v=false due to a out of range index:

** Fixed code **
...
else
{
if( flipImageH )
{
// only horizontal flip
for( int line = 0; line < height; line++ )
for( int pixel = 0; pixel < width/2; pixel ++ )
{
ptr[line*width+pixel] = ptr[line*width+pixel] ^ ptr[line*width + (width - pixel - 1)];
ptr[line*width + (width - pixel - 1)] = ptr[line*width+pixel] ^ ptr[line*width + (width - pixel - 1)];
ptr[line*width+pixel] = ptr[line*width+pixel] ^ ptr[line*width + (width - pixel - 1)];
}
}
}

Discussion

  • Check with new DSVL

     
    • labels: 690712 --> DSVL
     
    • assigned_to: nobody --> retrakker