context->matches could become NULL, add check re, wh
Signed-off-by: [email protected] --- libXt-1.0.8/src/TMstate.c.org 2010-10-20 22:15:07.000000000 +0200 +++ libXt-1.0.8/src/TMstate.c 2010-10-20 22:35:35.000000000 +0200 @@ -720,10 +720,13 @@ XtRealloc((char *)context->matches, context->maxMatches * sizeof(MatchPairRec)); } - context->matches[context->numMatches].isCycleStart = newState->isCycleStart; - context->matches[context->numMatches].isCycleEnd = newState->isCycleEnd; - context->matches[context->numMatches].typeIndex = newState->typeIndex; - context->matches[context->numMatches++].modIndex = newState->modIndex; + if ( context->matches ) + { + context->matches[context->numMatches].isCycleStart = newState->isCycleStart; + context->matches[context->numMatches].isCycleEnd = newState->isCycleEnd; + context->matches[context->numMatches].typeIndex = newState->typeIndex; + context->matches[context->numMatches++].modIndex = newState->modIndex; + } *contextPtr = context; } UNLOCK_PROCESS; _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
