Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Dangerous Function Cast  at rawlog.c:48

Categories: LANG.CAST.FN CWE:628 CWE:234
Warning ID: 99.99
Procedure: rawlog_destroy
Trace: View
Modified: Wed Sep 2 11:32:07 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/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 99.99 : Dangerous Function Cast

Priority:
State:
Finding:
Owner:
Note: