Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Null Pointer Dereference  at command-history.c:146

Categories: LANG.MEM.NPD CWE:476
Warning ID: 7433.28536
Procedure: command_history_next
Trace: view
Modified: Thu Nov 26 11:20:47 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-text/gui-readline.c
   Enter key_forward_history
 578 static void key_forward_history(void) 
 579 {
 580         const char *text;
 581         char *line;
 582  
true583         line = gui_entry_get_text(active_entry);
line <= 4095584         text = command_history_next(active_win, line);
     /kat0/fletcher/SATE/2010/irssi-0.8.14/src/fe-common/core/command-history.c
     Enter key_forward_history / command_history_next
 131   const char *command_history_next(WINDOW_REC *window, const char *text) 
 132   {
 133           HISTORY_REC *history;
 134           GList *pos;
 135    
 136           history = command_history_current(window);
 137           pos = history->pos;  
 138    
 139           if (pos != NULL)
 140                   history->pos = history->pos->next;
 141           else if (history->over_counter > 0) {
 142                   history->over_counter--;
 143                   history->pos = history->list;
 144           }
 145    
text <= 4095146           if (*text != '\0' &&     /* Null Pointer Dereference */
     Exit key_forward_history / command_history_next
Preconditions
active_entry = 0
window_history != 0
Postconditions
active_win->history->pos' = active_win->history->pos->next
history' = active_win->history
line' = 0
pos' = active_win->history->pos
text' = 0
window' = active_win




Change Warning 7433.28536 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: