Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Dangerous Function Cast  at Settings.c:46

Categories: LANG.CAST.FN CWE:628 CWE:234
Warning ID: 1716.1716
Procedure: perl_settings_free
Trace: View
Modified: Wed Sep 2 11:44:50 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
   /u1/paul/SATE/2010/c/irssi/irssi-0.8.14/src/perl/common/Settings.c
   Enter perl_settings_free
 36         list = g_hash_table_lookup(perl_settings, script);
 37         pos = gslist_find_icase_string(list, key);
 38         if (pos != NULL) {
 39                 list = g_slist_remove(list, pos->data);
 40                 g_hash_table_insert(perl_settings, script, list);
 41         }
 42 }
 43  
 44 static void perl_settings_free(PERL_SCRIPT_REC *script, GSList *list) 
 45 {
Wrong Number of Parameters46         g_slist_foreach(list, (GFunc) g_free, NULL);     /* Dangerous Function Cast */
 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) {
 56                 g_slist_foreach(list, (GFunc) settings_remove, NULL);   /* Dangerous Function Cast (ID: 1717.1717) */




Change Warning 1716.1716 : Dangerous Function Cast

Priority:
State:
Finding:
Owner:
Note: