|
From: SourceForge.net <no...@so...> - 2004-09-22 17:27:16
|
Bugs item #1032785, was opened at 2004-09-22 09:44 Message generated for change (Comment added) made by jwwalker You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=442052&aid=1032785&group_id=45158 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: bork3d (bork3d) Assigned to: Nobody/Anonymous (nobody) Summary: DrawContext mask image initialisation Initial Comment: A "malloc debug: double free" occurs in Q3Bitmap_Empty. The pointer to be freed is garbage due to an uninitialised field in a TQ3MacDrawContextData structure declared on the stack. This can be fixed where the DrawingContext is initialized in e3drawcontext_mac_new(). /* E3MacDrawContext_New is being called without the mask image field explicitly set, causing problems in Q3Bitmap_Empty. * Callers _do_ however set maskState to kQ3False, so respect a valid mask image if maskState is kQ3True */ if (instanceData- >data.macData.theData.drawContextData.maskState == kQ3False) instanceData- >data.macData.theData.drawContextData.mask.image = NULL; Similar fixes should be applied to other platform specific DrawingContext initialisation routines, such as e3drawcontext_windc_new() etc ---------------------------------------------------------------------- >Comment By: James W. Walker (jwwalker) Date: 2004-09-22 10:27 Message: Logged In: YES user_id=433183 I don't understand this. If some client code calls Q3MacDrawContext_New without setting all the fields of the TQ3MacDrawContextData structure, that's their bug, not Quesa's. Furthermore, e3drawcontext_mac_delete does check the maskState field before calling Q3Bitmap_Empty. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=442052&aid=1032785&group_id=45158 |