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
This commit is contained in:
abv
2014-05-29 15:05:47 +04:00
committed by apn
parent cae42e78e5
commit 2a54ebbf29
10 changed files with 87 additions and 112 deletions

View File

@@ -44,7 +44,12 @@ void rec_typarg(int argtype);
#ifdef _MSC_VER
// disable MSVC warnings in flex code
// Note that Intel compiler also defines _MSC_VER but has different warning ids
#if defined(__INTEL_COMPILER)
#pragma warning(disable:177 1786 1736)
#else
#pragma warning(disable:4131 4244 4273 4267 4127)
#endif
// Avoid includion of unistd.h if parser is generated on Linux (flex 2.5.35)
#define YY_NO_UNISTD_H