Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Dangerous Function Cast  at chat-completion.c:1046

Categories: LANG.CAST.FN CWE:628 CWE:234
Warning ID: 1406.26852
Procedure: auto_complete
Trace: view
Modified: Thu Nov 26 11:00: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/fe-common/core/chat-completion.c
   Enter auto_complete
 1036                 return NULL;
 1037  
 1038         nick = g_strndup(line, (int) (p-line));
 1039  
 1040         ret = NULL;
 1041         if (nicklist_find(channel, nick) == NULL) {
 1042                 /* not an exact match, use the first possible completion */ 
 1043                 comp = completion_channel_nicks(channel, nick, NULL);
 1044                 if (comp != NULL) {
 1045                         ret = g_strconcat(comp->data, p, NULL);
Wrong Number of Parameters1046                         g_list_foreach(comp, (GFunc) g_free, NULL);     /* Dangerous Function Cast */
 1047                         g_list_free(comp);
 1048                 }
 1049         }
 1050  
 1051         g_free(nick);
 1052  
 1053         return ret;
 1054 } 
 1055  
 1056 static void event_text(const char *data, SERVER_REC *server, WI_ITEM_REC *item)




Change Warning 1406.26852 : Dangerous Function Cast

Priority:
State:
Finding:
Owner:
Note: