Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 7337.28430
Procedure: sig_layout_save_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_save_item
 149 static void sig_layout_save_item(WINDOW_REC *window, WI_ITEM_REC *item,
 150                                  CONFIG_NODE *node) 
 151 {
 152         CONFIG_NODE *subnode;
 153         CHAT_PROTOCOL_REC *proto;
 154         const char *type;
 155  
 156         type = module_find_id_str("WINDOW ITEM TYPE", item->type);
 157         if (type == NULL)
 158                 return;
 159  
 160         subnode = config_node_section(node, NULL, NODE_TYPE_BLOCK);
 161  
 162         iconfig_node_set_str(subnode, "type", type);
 163         proto = item->chat_type == 0 ? NULL : 
 164                 chat_protocol_find_id(item->chat_type);
 165         if (proto != NULL)
 166                 iconfig_node_set_str(subnode, "chat_type", proto->name);
 167         iconfig_node_set_str(subnode, "name", item->visible_name);
 168  
 169         if (item->server != NULL) {
 170                 iconfig_node_set_str(subnode, "tag", item->server->tag);
 171                 if (IS_CHANNEL(item))
 172                     window_bind_add(window, item->server->tag, item->visible_name);
 173         } else if (IS_QUERY(item)) {
true174                 iconfig_node_set_str(subnode, "tag", QUERY(item)->server_tag);     /* Null Pointer Dereference */
Preconditions
&$unknown_595259 != 0
item->server = 0
item->chat_type >= 1
node->type <= 3
node->type >= 2
*chat_protocols->data = item->chat_type
*chat_protocols->data >= 1
Postconditions
proto' = chat_protocols->data
subnode' = &$unknown_595260
type' = &$unknown_595259




Change Warning 7337.28430 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: