Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Dangerous Function Cast  at Settings.c:56

Categories: LANG.CAST.FN CWE:628 CWE:234
Warning ID: 3638.27869
Procedure: sig_script_destroyed
Trace: view
Modified: Thu Nov 26 11:05:16 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/perl/common/Settings.c
   Enter sig_script_destroyed
 46         g_slist_foreach(list, (GFunc) g_free, NULL);   /* Dangerous Function Cast (ID: 3636.27868) */
 47         g_slist_free(list);
 48 }
 49  
 50 static void sig_script_destroyed(PERL_SCRIPT_REC *script) 
 51 {
 52         GSList *list;
 53  
 54         list = g_hash_table_lookup(perl_settings, script);
 55         if (list != NULL) {
Wrong Number of Parameters56                 g_slist_foreach(list, (GFunc) settings_remove, NULL);     /* Dangerous Function Cast */
 57                 perl_settings_free(script, list);
 58                 g_hash_table_remove(perl_settings, script);
 59         }
 60 } 
 61  
 62 void perl_settings_init(void)
 63 {
 64         perl_settings = g_hash_table_new((GHashFunc) g_direct_hash,
 65                                          (GCompareFunc) g_direct_equal);
 66         signal_add("script destroyed", (SIGNAL_FUNC) sig_script_destroyed);   /* Dangerous Function Cast (ID: 3641.27870) */




Change Warning 3638.27869 : Dangerous Function Cast

Priority:
State:
Finding:
Owner:
Note: