Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Null Pointer Dereference  at command-history.c:122

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2371.2382
Procedure: command_history_prev
Trace: View
Modified: Wed Sep 2 12:22: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/fe-text/gui-readline.c
   Enter key_backward_history
 567 static void key_backward_history(void) 
 568 {
 569         const char *text;
 570         char *line;
 571  
true572         line = gui_entry_get_text(active_entry);
line <= 4095573         text = command_history_prev(active_win, line);
     /u1/paul/SATE/2010/c/irssi/irssi-0.8.14/src/fe-common/core/command-history.c
     Enter key_backward_history / command_history_prev
$param_2 <= 4095106   const char *command_history_prev(WINDOW_REC *window, const char *text) 
 107   {
 108           HISTORY_REC *history;
 109           GList *pos;
 110    
 111           history = command_history_current(window);
 112           pos = history->pos;
 113    
 114           if (pos != NULL) {
 115                   history->pos = history->pos->prev;
 116                   if (history->pos == NULL)
 117                           history->over_counter++;
 118           } else {
 119                   history->pos = g_list_last(history->list);
 120           }
 121    
text <= 4095122           if (*text != '\0' &&     /* Null Pointer Dereference */
     Exit key_backward_history / command_history_prev
Preconditions
active_win->history->pos->prev != 0
active_entry = 0
window_history != 0
Postconditions
active_win->history->pos' = active_win->history->pos->prev
history' = active_win->history
line' = 0
pos' = active_win->history->pos
text' = 0
window' = active_win




Change Warning 2371.2382 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: