Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Null Pointer Dereference  at windows-layout.c:73

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2272.2278
Procedure: sig_layout_restore_item
Trace: View
Modified: Wed Sep 2 11:55:39 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-common/core/windows-layout.c
   Enter sig_layout_restore_item
 48 static void sig_layout_restore_item(WINDOW_REC *window, const char *type,
 49                                     CONFIG_NODE *node) 
 50 {
 51         char *name, *tag, *chat_type;
 52  
 53         chat_type = config_node_get_str(node, "chat_type", NULL);
 54         name = config_node_get_str(node, "name", NULL);
 55         tag = config_node_get_str(node, "tag", NULL);
 56  
 57         if (name == NULL || tag == NULL)
 58                 return;
 59  
 60         if (g_ascii_strcasecmp(type, "CHANNEL") == 0) {
 61                 /* bind channel to window */ 
 62                 WINDOW_BIND_REC *rec = window_bind_add(window, tag, name);
 63                 rec->sticky = TRUE;   /* Null Pointer Dereference (ID: 2273.2279) */
 64         } else if (g_ascii_strcasecmp(type, "QUERY") == 0 && chat_type != NULL) {
 65                 CHAT_PROTOCOL_REC *protocol;
 66                 /* create query immediately */ 
 67                 signal_add("query created",
 68                            (SIGNAL_FUNC) signal_query_created_curwin);   /* Dangerous Function Cast (ID: 1201.1201) */
 69  
 70                 restore_win = window;
 71                  
true72                 protocol = chat_protocol_find(chat_type);
protocol <= 409573                 if (protocol->query_create != NULL)     /* Null Pointer Dereference */
Preconditions
&$unknown_986246 != 0
&$unknown_986247 != 0
&$unknown_986248 != 0
&$unknown_986249 != 0
chat_protocols->next = 0
*$param_3 <= 3
*$param_3 >= 2
Postconditions
chat_type' = &$unknown_986249
name' = &$unknown_986246
node' = $param_3
protocol' = 0
restore_win' = $param_1
tag' = &$unknown_986247
type' = $param_2
window' = $param_1




Change Warning 2272.2278 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: