In function inline void Assign( const Image &image )
it is possible to go out of source buffer memory and get segmentation fault.
diff -u zm_image.h_orig zm_image.h
Code: Select all
--- zm_image.h_orig 2006-05-08 15:46:53.000000000 +0300
+++ zm_image.h 2006-12-29 11:21:15.000000000 +0200
@@ -220,7 +220,7 @@
memset( buffer, 0, size );
}
}
- memcpy( buffer, image.buffer, size );
+ memcpy( buffer, image.buffer, image.size );
}
inline void CopyBuffer( const Image &image )
inline void Assign( int p_width, int p_height, int p_colours, unsigned char *new_buffer )
This patch is for 1.22.2, but in 1.22.3 this code is not changed.
Happy New Year.
Regards.
Andrew.