Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Dangerous Function Cast  at commands.c:421

Categories: LANG.CAST.FN CWE:628 CWE:234
Warning ID: 716.26162
Procedure: command_calc_options
Trace: view
Modified: Thu Nov 26 10:57:17 2009   show details
 
Priority: None
State: None
Finding: None
Owner: None
  edit properties

Legend [ X ]
Warning Location
Contributes
Parse Error
Other Warning
Two or More Loop Iterations
On Execution Path
Comment
Macro
Preprocessor
Include
Keyword
Preprocessed Away

Source  |  Language: C Hide Legend     
ProblemLineSource
   /kat0/fletcher/SATE/2010/irssi-0.8.14/src/core/commands.c
   Enter command_calc_options
 411                         list = g_slist_append(list, g_strdup(*tmp));
 412                 }
 413         }
 414         g_strfreev(optlist);
 415  
 416         /* linked list -> string[] */ 
 417         str = gslist_to_string(list, " ");
 418         rec->options = g_strsplit(str, " ", -1);
 419         g_free(str);
 420  
Wrong Number of Parameters421         g_slist_foreach(list, (GFunc) g_free, NULL);     /* Dangerous Function Cast */
 422         g_slist_free(list);
 423 } 
 424  
 425 /* recalculate options to command from options in all modules */ 
 426 static void command_update_options(COMMAND_REC *rec)
 427 {
 428         GSList *tmp;
 429  
 430         g_strfreev(rec->options);
 431         rec->options = NULL;




Change Warning 716.26162 : Dangerous Function Cast

Priority:
State:
Finding:
Owner:
Note: