Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Null Pointer Dereference  at mainwindows.c:810

Categories: LANG.MEM.NPD CWE:476
Warning ID: 7440.28547
Procedure: cmd_window_show
Trace: view
Modified: Thu Nov 26 11:20:59 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/mainwindows.c
   Enter cmd_window_show
 783 static void cmd_window_show(const char *data) 
 784 {
 785         MAIN_WINDOW_REC *parent;
 786         WINDOW_REC *window;
 787  
 788         if (*data == '\0') cmd_return_error(CMDERR_NOT_ENOUGH_PARAMS);
 789  
 790         if (is_numeric(data, '\0')) {
 791                 window = window_find_refnum(atoi(data));
 792                 if (window == NULL) {
 793                         printformat_window(active_win, MSGLEVEL_CLIENTERROR,
 794                                            TXT_REFNUM_NOT_FOUND, data);
 795                 }
 796         } else {
 797                 window = window_find_item(active_win->active_server, data);
 798         }
 799  
 800         if (window == NULL || is_window_visible(window))
 801                 return;
 802  
 803         if (WINDOW_GUI(window)->sticky) {
 804                 printformat_window(active_win, MSGLEVEL_CLIENTERROR,
 805                                    TXT_CANT_SHOW_STICKY_WINDOWS);
 806                 return;
 807         }
 808  
true809         parent = mainwindow_create();
parent <= 4095810         parent->active = window;     /* Null Pointer Dereference */
Preconditions
((char*)&((char*)$unknown_2171614)[80])[8] = 0
*data != 0
strlen(data) != 0
*((char*)$unknown_2171614)[80] != &$unknown_2171614
mainwindows >= 1
$input_12 != *windows->data
Postconditions
parent' = 0
window' = &$unknown_2171614




Change Warning 7440.28547 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: