diff options
Diffstat (limited to 'epan/radius_dict.l')
-rw-r--r-- | epan/radius_dict.l | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/epan/radius_dict.l b/epan/radius_dict.l index 6934a57017..5c46c045ac 100644 --- a/epan/radius_dict.l +++ b/epan/radius_dict.l @@ -1,6 +1,7 @@ %top { /* Include this before everything else, for various large-file definitions */ #include "config.h" +#include <wireshark.h> } /* @@ -95,7 +96,7 @@ /* * Disable diagnostics in the code generated by Flex. */ -DIAG_OFF_FLEX +DIAG_OFF_FLEX() /* * See @@ -288,7 +289,7 @@ static void add_value(Radius_scanner_state_t* state, const gchar* attrib_name, c <ATTR>[0-9a-z_/.-]+ { yyextra->attr_name = g_strdup(yytext); yyextra->encrypted = 0; yyextra->has_tag = FALSE; BEGIN ATTR_W_NAME; } <ATTR_W_NAME>[0-9.]+ { yyextra->attr_id = g_strdup(yytext); BEGIN ATTR_W_ID;} -<ATTR_W_NAME>0x[0-9a-f]+ { yyextra->attr_id = g_strdup_printf("%u",(int)strtoul(yytext,NULL,16)); BEGIN ATTR_W_ID;} +<ATTR_W_NAME>0x[0-9a-f]+ { yyextra->attr_id = ws_strdup_printf("%u",(int)strtoul(yytext,NULL,16)); BEGIN ATTR_W_ID;} <ATTR_W_ID>integer { yyextra->attr_type = radius_integer; BEGIN ATTR_W_TYPE; } <ATTR_W_ID>string { yyextra->attr_type = radius_string; BEGIN ATTR_W_TYPE; } <ATTR_W_ID>octets { yyextra->attr_type = radius_octets; BEGIN ATTR_W_TYPE; } @@ -358,7 +359,7 @@ static void add_value(Radius_scanner_state_t* state, const gchar* attrib_name, c yyextra->include_stack[yyextra->include_stack_ptr++] = YY_CURRENT_BUFFER; - yyextra->fullpaths[yyextra->include_stack_ptr] = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", + yyextra->fullpaths[yyextra->include_stack_ptr] = ws_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", yyextra->directory,yytext); yyin = ws_fopen( yyextra->fullpaths[yyextra->include_stack_ptr], "r" ); @@ -412,7 +413,7 @@ static void add_value(Radius_scanner_state_t* state, const gchar* attrib_name, c /* * Turn diagnostics back on, so we check the code that we've written. */ -DIAG_ON_FLEX +DIAG_ON_FLEX() static void add_vendor(Radius_scanner_state_t* state, const gchar* name, guint32 id, guint type_octets, guint length_octets, gboolean has_flags) { radius_vendor_info_t* v; @@ -534,6 +535,7 @@ static gboolean add_attribute(Radius_scanner_state_t* state, const gchar* name, a->vs = NULL; a->hf = -1; a->hf_alt = -1; + a->hf_enc = -1; a->hf_tag = -1; a->hf_len = -1; a->ett = -1; @@ -741,7 +743,7 @@ gboolean radius_load_dictionary (radius_dictionary_t* d, gchar* dir, const gchar state.directory = dir; - state.fullpaths[0] = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", + state.fullpaths[0] = ws_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", state.directory,filename); state.linenums[0] = 1; for (i = 1; i < MAX_INCLUDE_DEPTH; i++) { |