On 09/07/2015 12:29 PM, marcus overhagen wrote:
On Sat, Sep 5, 2015 at 4:11 PM, <mmlr@xxxxxxxx> wrote:
case B_PIC_SET_STIPLE_PATTERN:
{
+ const pattern* stipplePattern;
+ if (callbacks.set_stipple_pattern == NULL
+ || !reader.Get(stipplePattern)) {
+ break;
+ }
+
+ callbacks.set_stipple_pattern(userData,
*stipplePattern);
break;
}
Although it is save, playback of the picture is completely aborted as
soon as any of the callbacks is zero,
because the parameters won't be read and any further data that is read is wrong.
I would change this to always get the parameters first, and then test
for callback availablity.