Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Dangerous Function Cast  at rawlog.c:48

Categories: LANG.CAST.FN CWE:628 CWE:234
Warning ID: 806.26252
Procedure: rawlog_destroy
Trace: view
Modified: Thu Nov 26 10:57:54 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/rawlog.c
   Enter rawlog_destroy
 38         RAWLOG_REC *rec;
 39  
 40         rec = g_new0(RAWLOG_REC, 1);
 41         return rec;
 42 }
 43  
 44 void rawlog_destroy(RAWLOG_REC *rawlog) 
 45 {
 46         g_return_if_fail(rawlog != NULL);
 47  
Wrong Number of Parameters48         g_slist_foreach(rawlog->lines, (GFunc) g_free, NULL);     /* Dangerous Function Cast */
 49         g_slist_free(rawlog->lines);
 50  
 51         if (rawlog->logging) {
 52                 write_buffer_flush();
 53                 close(rawlog->handle);
 54         }
 55         g_free(rawlog);
 56 } 
 57  
 58 /* NOTE! str must be dynamically allocated and must not be freed after! */ 




Change Warning 806.26252 : Dangerous Function Cast

Priority:
State:
Finding:
Owner:
Note: