Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2375.2386
Procedure: textbuffer_view_init_bottom
Trace: View
Modified: Wed Sep 2 12:22:27 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 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
((char*)$param_1)[100] = 0
Postconditions
$unknown_3330028' = &$unknown_3330029
((char*)&$unknown_3330029)[16]' = 0
line' = &$unknown_3330029
view' = $param_1




Change Warning 2375.2386 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: