Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Null Pointer Dereference  at windows-layout.c:73

Categories: LANG.MEM.NPD CWE:476
Warning ID: 7335.28428
Procedure: sig_layout_restore_item
Trace: view
Modified: Thu Nov 26 11:09:40 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-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: 7336.28429) */
 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: 2358.27353) */
 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_590635 != 0
&$unknown_590636 != 0
&$unknown_590637 != 0
&$unknown_590638 != 0
chat_protocols->next = 0
node->type <= 3
node->type >= 2
Postconditions
chat_type' = &$unknown_590638
name' = &$unknown_590635
protocol' = 0
restore_win' = window
tag' = &$unknown_590636




Change Warning 7335.28428 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: