Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Dangerous Function Cast  at command-history.c:189

Categories: LANG.CAST.FN CWE:628 CWE:234
Warning ID: 1471.26917
Procedure: command_history_destroy
Trace: view
Modified: Thu Nov 26 11:00:33 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/fe-common/core/command-history.c
   Enter command_history_destroy
 179  
 180 void command_history_destroy(HISTORY_REC *history) 
 181 {
 182         g_return_if_fail(history != NULL);
 183  
 184         /* history->refcount should be 0 here, or somthing is wrong... */ 
 185         g_return_if_fail(history->refcount == 0);
 186  
 187         histories = g_slist_remove(histories, history);
 188  
Wrong Number of Parameters189         g_list_foreach(history->list, (GFunc) g_free, NULL);     /* Dangerous Function Cast */
 190         g_list_free(history->list);
 191  
 192         g_free_not_null(history->name);
 193         g_free(history);
 194 } 
 195  
 196 void command_history_link(const char *name)
 197 {
 198         HISTORY_REC *rec;
 199         rec = command_history_find_name(name);




Change Warning 1471.26917 : Dangerous Function Cast

Priority:
State:
Finding:
Owner:
Note: