< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

Re: [reSIProcate] memory overrun in MsgHeaderScanner.cxx


Found this error with BoundsChecker.

kaiduan
--- david Butcher <david@xxxxxxxxxxxxxx> wrote:

> Seems like, yeah. Never got a complaint from
> valgrind or purify.
> Likely an alignment thing.
> 
> I'll fix it.
> 
> david
> 
> 
> 
> Quoting kaiduan xie <kaiduanx@xxxxxxxx>:
> 
> > Hi, all,
> >
> > Just found a memory overrun in
> MsgHeaderScanner.cxx,
> >
> >    static CharInfo charInfoArray[UCHAR_MAX];
> >
> >    static void initCharInfoArray()
> >    {
> >        for(unsigned int charIndex = 0; charIndex
> <=
> > UCHAR_MAX; ++charIndex)
> >        {
> >            charInfoArray[charIndex].category =
> > ccOther;
> >           
> charInfoArray[charIndex].textPropBitMask =
> > 0;
> >        }
> >
> > Here, charInfoArray has a size of UCHAR_MAX, but
> the
> > charIndex has value of UCHAR_MAX. Should we change
> it
> > to static CharInfo charInfoArray[UCHAR_MAX + 1];
> >
> > Please confirm that.
> >
> > Many thanks,
> >
> > kaiduan
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> > _______________________________________________
> > resiprocate-devel mailing list
> > resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> >
>
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
> >
> 
> 
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel@xxxxxxxxxxxxxxxxxxx
>
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com