0024897: Possibility of uncontrolled exit if scanner fails in ExprIntrp
authorabv <abv@opencascade.com>
Thu, 29 May 2014 11:05:47 +0000 (15:05 +0400)
committerapn <apn@opencascade.com>
Thu, 29 May 2014 11:06:48 +0000 (15:06 +0400)
commit2a54ebbf29872caa7deb6b528e36ea7451dbc0c5
tree786f299ea27a45589e25963a6f62c5e86c5c6386
parentcae42e78e50dc2723143634050cd05b7ec7857f3
0024897: Possibility of uncontrolled exit if scanner fails in ExprIntrp

Macro YY_FATAL_ERROR() is defined in ExprIntrp.lex in order to have exception instead of program exit in case of scanner error. Fixed-length string buffers are replaced by TCollection_AsciiString to avoid buffer overflow.
Some code refactoring: declarations of functions moved to header file, unused global declarations and variables removed, compiler warnings fixed or disabled, obsolete EDL file removed.
Test case for issue CR24897
Correction of MSVC compiler warning when scanner is generated using Flex 2.5.35 on Linux
src/ExprIntrp/ExprIntrp.cxx
src/ExprIntrp/ExprIntrp.lex
src/ExprIntrp/ExprIntrp.yacc
src/ExprIntrp/ExprIntrp_CMPLRS.edl [deleted file]
src/ExprIntrp/ExprIntrp_yaccintrf.cxx
src/ExprIntrp/ExprIntrp_yaccintrf.hxx
src/ExprIntrp/ExprIntrp_yacclex.cxx
src/ExprIntrp/FILES
src/StepFile/step.lex
tests/bugs/fclasses/bug24897 [new file with mode: 0755]