Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Null Pointer Dereference  at textbuffer-view.c:488

Categories: LANG.MEM.NPD CWE:476
Warning ID: 7436.28539
Procedure: textbuffer_view_init_bottom
Trace: view
Modified: Thu Nov 26 11:20:53 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/textbuffer-view.c
   Enter textbuffer_view_init_bottom
 474 static void textbuffer_view_init_bottom(TEXT_BUFFER_VIEW_REC *view) 
 475 {
 476         LINE_REC *line;
 477         int linecount, total;
 478  
 479         if (view->empty_linecount == 0) {
 480                 /* no empty lines in screen, no need to try to keep 
 481                    the old bottom startline */ 
 482                 view->bottom_startline = NULL;
 483         }
 484  
 485         total = 0;
 486         line = textbuffer_line_last(view->buffer);
 487         for (; line != NULL; line = line->prev) {
true488                 linecount = view_get_linecount(view, line);     /* Null Pointer Dereference */
 489                 if (line == view->bottom_startline) {
 490                         /* keep the old one, make sure that subline is ok */ 
 491                         if (view->bottom_subline > linecount)
 492                                 view->bottom_subline = linecount;
 493                         view->empty_linecount = view->height - total - 
 494                                 (linecount-view->bottom_subline);
 495                         return;
 496                 }
 497  
 498                 total += linecount;
 499                 if (total >= view->height) {
Preconditions
view->empty_linecount = 0
Postconditions
$unknown_2158156' = &$unknown_2158157
((char*)&$unknown_2158157)[8]' = 0
line' = &$unknown_2158157




Change Warning 7436.28539 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: