From ca3fb3ec80c25102ecfed597c3934898c71d30f7 Mon Sep 17 00:00:00 2001 From: kevin Date: Wed, 1 May 2013 15:06:05 -0700 Subject: [PATCH] cmRtSys.c: cmRtSysContext() now checks validity of rtSubIdx. --- cmRtSys.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmRtSys.c b/cmRtSys.c index 5aee4b0..753cd83 100644 --- a/cmRtSys.c +++ b/cmRtSys.c @@ -1220,6 +1220,9 @@ cmRtSysCtx_t* cmRtSysContext( cmRtSysH_t h, unsigned rtSubIdx ) if( _cmRtSysVerifyInit(p,true) != kOkRtRC ) return NULL; + if( rtSubIdx >= p->ssCnt ) + return NULL; + return &p->ssArray[rtSubIdx].ctx; }