Hi Alexander,
I guess you meant this part:
if ((csp==0 && (i==0 || !isId(constScope[i-1])) || (csp>0 && csp<6)) &&
c==constScope[csp]
) csp++; else csp=0;
After a closer look it turns out to be wrong indeed. This was what was
intended:
if (csp<6 && c==constScope[csp] && // character matches substring
"const"
(csp>0 || // if it is the first character
i==0 || // the previous may not be a digit
!isId(s.at(i-1))
)
)
csp++;
else // reset counter
csp=0;
Thanks for reporting this, I'll fix it in the next CVS update.
If you find more of these please report them.
Seems like a very useful tool you are working on ;-)
Regards,
Dimitri
On 6/9/07, Alexander Lamaison <aw...@do...> wrote:
>
> Hello,
>
>
>
> I have been developing a bounds-checker for C++. I tested it using
> Doxygen and it finds a bounds error in util.cpp on line 1427 when running
> the define example.
>
>
>
> I went through the code by hand and it does, indeed, seem that the use of
> 'constScope[]' in '!isId(constScope[i-1])' can go out-of-bounds if the
> string passed in as parameter 's' is longer than 6 and, I assume, similarly
> with 'virtualScope[]' on line 1430.
>
>
>
> I realise that this is a very minor bounds error but I'm very curious
> whether this behaviour is intended.
>
>
>
> Alex Lamaison
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Doxygen-develop mailing list
> Dox...@li...
> https://lists.sourceforge.net/lists/listinfo/doxygen-develop
>
>
|