aboutsummaryrefslogtreecommitdiffstats
path: root/lib/megaco/src/flex
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2013-03-26 16:39:16 +0100
committerMicael Karlberg <[email protected]>2013-03-26 16:39:16 +0100
commite20a7db2bba04777a54c8d92f873d8322455bb25 (patch)
treea807ddb11b4f3f36b71212b12feae349a26d535a /lib/megaco/src/flex
parent7b066c37b4ed11ac5f4438fd325fcb35fadb67c7 (diff)
downloadotp-e20a7db2bba04777a54c8d92f873d8322455bb25.tar.gz
otp-e20a7db2bba04777a54c8d92f873d8322455bb25.tar.bz2
otp-e20a7db2bba04777a54c8d92f873d8322455bb25.zip
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!
Diffstat (limited to 'lib/megaco/src/flex')
-rw-r--r--lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src4
1 files changed, 3 insertions, 1 deletions
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 */