From e20a7db2bba04777a54c8d92f873d8322455bb25 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Tue, 26 Mar 2013 16:39:16 +0100 Subject: Ensure of incorrect number of terms when scanning property groups At the end of the mfs_load_property_groups function, the final property group list and property groups list is "terminated". A call to mfs_ensure_term_spec with (incorrect) size 4 was made prior to this to ensure enough data was available. The correct size was 6! --- lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src b/lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src index a8ff86e528..efe817b92d 100644 --- a/lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src +++ b/lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src @@ -103,10 +103,12 @@ typedef struct { /* IBL = In Buffer Length - the raw (un-decoded) message buffer length */ #define TERM_SPEC_SIZE_INITIAL(IBL) (1024 + 2*(IBL)) +// #define TERM_SPEC_SIZE_INITIAL(IBL) (1000 + (IBL)) /* CTSS = Current term spec size - the current term spec length */ /* S = Size - how many positions we need */ #define TERM_SPEC_SIZE_NEXT(CTSS,S) ((CTSS) + 1024 + (S)) +// #define TERM_SPEC_SIZE_NEXT(CTSS,S) (2*(CTSS) + (S)) #if !defined(MEGACO_REENTRANT_FLEX_SCANNER) static MfsErlDrvData mfs_drv_data; @@ -1265,7 +1267,7 @@ static void mfs_load_property_groups(MfsErlDrvData* dataP) } // if ((yytext[i] != SP)... } // while ... - mfs_ensure_term_spec(dataP, 4); // 2 + 2 just in case + mfs_ensure_term_spec(dataP, 6); // 3 + 3 just in case /* Make sure we actually have some groups */ -- cgit v1.2.3