Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Null Pointer Dereference  at mainwindows.c:368

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2382.2393
Procedure: mainwindows_resize_smaller
Trace: View
Modified: Wed Sep 2 12:22:52 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/mainwindows.c
   Enter mainwindows_resize_smaller
 351 static void mainwindows_resize_smaller(int xdiff, int ydiff) 
 352 {
 353         MAIN_WINDOW_REC *rec;
 354         GSList *sorted, *tmp;
 355         int space;
 356  
true357         sorted = mainwindows_get_sorted(TRUE);
 358         for (;;) {
 359                 space = 0;
 360                 for (tmp = mainwindows; tmp != NULL; tmp = tmp->next) {
 361                         rec = tmp->data;
 362                         space += MAIN_WINDOW_TEXT_HEIGHT(rec)-WINDOW_MIN_SIZE;
 363                 }
 364  
 365                 if (space >= -ydiff)
 366                         break;
 367  
sorted <= 4095368                 rec = sorted->data;     /* Null Pointer Dereference */
Preconditions
$param_2 <= -1
mainwindows = 0
Postconditions
sorted' = 0
space' = 0
tmp' = mainwindows
xdiff' = $param_1
ydiff' = $param_2




Change Warning 2382.2393 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: