Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Null Pointer Dereference  at textbuffer-view.c:1088

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2358.2369
Procedure: view_remove_line
Trace: View
Modified: Wed Sep 2 12:19:50 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/textbuffer-view.c
   Enter view_remove_line
 1074 static void view_remove_line(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line,
 1075                              int linecount) 
 1076 {
 1077         int realcount;
 1078  
 1079         view_bookmarks_check(view, line);
 1080  
 1081         if (view->buffer->cur_line == line) {
 1082                 /* the last line is being removed */ 
 1083                 LINE_REC *prevline;
 1084  
 1085                 prevline = view->buffer->first_line == line ? NULL : 
 1086                         textbuffer_line_last(view->buffer);
 1087                 view->cache->last_linecount = prevline == NULL ? 0 : 
true1088                         view_get_linecount(view, prevline);     /* Null Pointer Dereference */
Preconditions
((char*)*$param_1)[24] = $param_2
((char*)*$param_1)[8] != $param_2
Postconditions
line' = $param_2
linecount' = $param_3
prevline' = ((char*)*$param_1)[24]
view' = $param_1




Change Warning 2358.2369 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: