Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Dangerous Function Cast  at flood.c:134

Categories: LANG.CAST.FN CWE:628 CWE:234
Warning ID: 1356.26802
Procedure: flood_hash_destroy
Trace: view
Modified: Thu Nov 26 11:00:05 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/irc/flood/flood.c
   Enter flood_hash_destroy
 124                                           (GCompareFunc) g_istr_equal);
 125 }
 126  
 127 static void flood_hash_destroy(const char *key, FLOOD_REC *flood) 
 128 {
 129         while (flood->items != NULL) {
 130                 FLOOD_ITEM_REC *rec = flood->items->data;
 131  
 132                 flood->items = g_slist_remove(flood->items, rec);
 133  
Wrong Number of Parameters134                 g_slist_foreach(rec->msgtimes, (GFunc) g_free, NULL);     /* Dangerous Function Cast */
 135                 g_slist_free(rec->msgtimes);
 136                 g_free(rec->target);
 137                 g_free(rec);
 138         }
 139  
 140         g_free(flood->nick);
 141         g_free(flood);
 142 } 
 143  
 144 /* Deinitialize flood protection */ 




Change Warning 1356.26802 : Dangerous Function Cast

Priority:
State:
Finding:
Owner:
Note: