[Gs-code-review] A fix for #516530 heap crash with OTGuide.pdf .

L. Peter Deutsch ghost at aladdin.com
Wed Feb 13 23:22:06 PST 2002


> +     penum->mask[0].depth = penum->mask[1].depth = 0;

Please explain why this is needed.  The comment immediately above these
assignments clearly states that they are initializing pointers in case an
error occurs; the depth members are not involved in this.

! 	     * Hack: we pass pis here, rather we need to
  	     * create another imager state with default log_op, etc.
+              */

The English needs improving, but the more serious issue is that passing pis
rather than NULL will definitely produce incorrect behavior if the imager
state has non-default values for the logical op, and perhaps for other
members as well.  What goes wrong when passing NULL?

-- 

L. Peter Deutsch     |    Aladdin Enterprises   |  203 Santa Margarita Ave.
ghost at aladdin.com    |  http://www.aladdin.com  |  Menlo Park, CA 94025

	The future of software is at http://www.opensource.org



More information about the gs-code-review mailing list