commit 3fdc4790b711bf5684c4533b6ec9e725b26f1152
Author: Johnny Jazeix <jazeix@gmail.com>
Date:   Mon Dec 3 08:49:51 2018 +0100

    fix crash when more than 32 elements

diff --git a/src/parser/PajeParser/PajeDefinition.hpp b/src/parser/PajeParser/PajeDefinition.hpp
index 7c6cc16..15d100c 100644
--- a/src/parser/PajeParser/PajeDefinition.hpp
+++ b/src/parser/PajeParser/PajeDefinition.hpp
@@ -78,10 +78,10 @@ typedef enum paje_eventdef_e {
 
 /*!
  * \brief Names of the fields describing events
- *        This is a non echaustive list of the names which can be used
- *        to described the fields of each events. This list conatins
+ *        This is a non exhaustive list of the names which can be used
+ *        to described the fields of each events. This list contains
  *        only the field's name required by some events. It can be
- *        automatically extended inside the trace to be adfapted to
+ *        automatically extended inside the trace to be adapted to
  *        the need of the user.
  */
 #define FIELDNAME_SIZEMAX           32
diff --git a/src/parser/PajeParser/ParserDefinitionPaje.cpp b/src/parser/PajeParser/ParserDefinitionPaje.cpp
index fca107c..500b0d8 100644
--- a/src/parser/PajeParser/ParserDefinitionPaje.cpp
+++ b/src/parser/PajeParser/ParserDefinitionPaje.cpp
@@ -319,7 +319,10 @@ void ParserDefinitionPaje::add_field_to_definition(const PajeLine_t *line){
 #else
         strcpy_s(newfn, size, fieldname);
 #endif
-
+        // In case there are more than the default value
+        if(_FieldNames.size() <= _nbFieldNames) {
+            _FieldNames.resize(2*_nbFieldNames);
+        }
         _FieldNames[_nbFieldNames]._name    = newfn;
         _FieldNames[_nbFieldNames]._id      = _nbFieldNames;
         _FieldNames[_nbFieldNames]._code    = (1 << _nbFieldNames);
