Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2219.2225
Procedure: auto_word_complete
Trace: View
Modified: Wed Sep 2 11:53:13 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 auto_word_complete
 86 char *auto_word_complete(const char *line, int *pos) 
 87 {
 88         GString *result;
 89         const char *replace;
 90         char *word, *wordstart, *ret;
 91         int startpos;
 92  
 93         g_return_val_if_fail(line != NULL, NULL);
 94         g_return_val_if_fail(pos != NULL, NULL);
 95  
true96         word = get_word_at(line, *pos, &wordstart);
 97         startpos = (int) (wordstart-line);   /* Uninitialized Variable (ID: 2220.2226) */
 98  
 99         result = g_string_new(line);
word <= 4095100         g_string_erase(result, startpos, strlen(word));     /* Null Pointer Dereference */
Preconditions
$param_1 != 0
*$param_2 <= -1
Postconditions
_g_boolean_var_' = 1
_g_boolean_var_' = 1
line' = $param_1
pos' = $param_2
word' = 0




Change Warning 2219.2225 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: