From: Frank W. <war...@po...> - 2006-11-08 16:29:53
|
Julien Demaria wrote: > Yes, using a larger fingerprint should make my bad luck case almost impossible :) Julien, I have committed a code change to make it look like this: const static char *signature = "glReadPixels() check signature"; scanline = row_of_chunks + x_chunk * 3 + line * width * 3; if( x_chunk_size * y_chunk_size >= strlen(signature) ) memcpy( scanline, signature, strlen(signature) ); glReadPixels( 0, y_chunk_size - line - 1, MIN(x_chunk_size,width-x_chunk), 1, GL_RGB, GL_UNSIGNED_BYTE, scanline ); if( x_chunk_size * y_chunk_size >= strlen(signature) && memcmp( scanline, signature, strlen(signature)) == 0 ) { CPLDebug( "OpenEV", "glReadPixels() appears to have failed." ); errcode = 1; } This should be substantially safer. Now to make sure this makes it into OpenEV 2! Mario? Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, war...@po... light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | President OSGeo, http://osgeo.org |