Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Dangerous Function Cast  at fe-core-commands.c:216

Categories: LANG.CAST.FN CWE:628 CWE:234
Warning ID: 836.836
Procedure: event_command
Trace: View
Modified: Wed Sep 2 11:37:12 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/fe-common/core/fe-core-commands.c
   Enter event_command
 206                 strchr(settings_get_str("cmdchars"), *data) != NULL;   /* Null Pointer Dereference (ID: 2240.2246) */
 207  
 208         /* /^command hides the output of the command */ 
 209         cmdchar = *data == '\0' ? NULL : 
 210                 strchr(settings_get_str("cmdchars"), *data);   /* Null Pointer Dereference (ID: 2239.2245) */
 211         if (cmdchar != NULL && (data[1] == '^' ||
 212                                 (data[1] == *cmdchar && data[2] == '^'))
 213                             && !command_hide_output++) {
 214                 signal_add_first("print starting", (SIGNAL_FUNC) sig_stop);   /* Dangerous Function Cast (ID: 838.838) */
 215                 signal_add_first("print format", (SIGNAL_FUNC) sig_stop);   /* Dangerous Function Cast (ID: 837.837) */
Wrong Number of Parameters216                 signal_add_first("print text", (SIGNAL_FUNC) sig_stop);     /* Dangerous Function Cast */
 217         }
 218 
 219  
 220 static void event_command_last(const char *data)
 221 {
 222         if (command_hide_output && !--command_hide_output) {
 223                 signal_remove("print starting", (SIGNAL_FUNC) sig_stop);   /* Dangerous Function Cast (ID: 839.839) */
 224                 signal_remove("print format", (SIGNAL_FUNC) sig_stop);   /* Dangerous Function Cast (ID: 840.840) */
 225                 signal_remove("print text", (SIGNAL_FUNC) sig_stop);   /* Dangerous Function Cast (ID: 841.841) */
 226         }




Change Warning 836.836 : Dangerous Function Cast

Priority:
State:
Finding:
Owner:
Note: