Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Null Pointer Dereference  at completion.c:587

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2225.2231
Procedure: sig_complete_word
Trace: View
Modified: Wed Sep 2 11:53:19 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/completion.c
   Enter sig_complete_word
 555 static void sig_complete_word(GList **list, WINDOW_REC *window,
 556                               const char *word, const char *linestart,
 557                               int *want_space) 
 558 {
 559         const char *newword, *cmdchars;
 560         char *signal, *cmd, *args, *line;
 561  
 562         g_return_if_fail(list != NULL);
 563         g_return_if_fail(word != NULL);
 564         g_return_if_fail(linestart != NULL);
 565  
 566         /* check against "completion words" list */ 
 567         newword = completion_find(word, FALSE);
 568         if (newword != NULL) {
 569                 *list = g_list_append(*list, g_strdup(newword));
 570  
 571                 signal_stop();
 572                 return;
 573         }
 574  
 575         if (*linestart != '\0' && (*word == '/' || *word == '~')) {
 576                 /* quite likely filename completion */ 
 577                 *list = g_list_concat(*list, filename_complete(word, NULL));
 578                 if (*list != NULL) {
 579                         *want_space = FALSE;
 580                         signal_stop();
 581                         return;
 582                 }
 583         }
 584  
 585         /* command completion? */ 
true586         cmdchars = settings_get_str("cmdchars");
cmdchars <= 4095587         if (*word != '\0' && *linestart == '\0' && strchr(cmdchars, *word)) {     /* Null Pointer Dereference */
Preconditions
$param_1 != 0
*$param_3 != 0
strlen($param_3) != 0
*$param_4 = 0
strlen($param_4) = 0
Postconditions
_g_boolean_var_' = 1
_g_boolean_var_' = 1
_g_boolean_var_' = 1
cmdchars' = 0
linestart' = $param_4
list' = $param_1
newword' = 0
want_space' = $param_5
window' = $param_2
word' = $param_3




Change Warning 2225.2231 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: