#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

  • Hartmut Seichter

    Check with new DSVL

     
  • Hartmut Seichter

    • labels: 690712 --> DSVL
     
  • Hartmut Seichter

    • assigned_to: nobody --> retrakker
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks