Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Null Pointer Dereference  at servers-setup.c:400

Categories: LANG.MEM.NPD CWE:476
Warning ID: 6229.28293
Procedure: server_setup_read
Trace: view
Modified: Thu Nov 26 11:08:33 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/core/servers-setup.c
   Enter server_setup_read
 364 static SERVER_SETUP_REC *server_setup_read(CONFIG_NODE *node) 
 365 {
 366         SERVER_SETUP_REC *rec;
 367         CHATNET_REC *chatnetrec;
 368         char *server, *chatnet, *family;
 369         int port;
 370  
 371         g_return_val_if_fail(node != NULL, NULL);
 372  
 373         server = config_node_get_str(node, "address", NULL);
 374         if (server == NULL)
 375                 return NULL;
 376  
 377         port = config_node_get_int(node, "port", 0);
 378         if (server_setup_find_port(server, port) != NULL) {
 379                 /* already exists - don't let it get there twice or 
 380                    server reconnects will screw up! */ 
 381                 return NULL;
 382         }
 383  
 384         rec = NULL;
 385         chatnet = config_node_get_str(node, "chatnet", NULL);
 386  
 387         chatnetrec = chatnet == NULL ? NULL : chatnet_find(chatnet);
 388         if (chatnetrec == NULL && chatnet != NULL) {
 389                 /* chat network not found, create it. */ 
 390                 chatnetrec = chat_protocol_get_default()->create_chatnet();
 391                 chatnetrec->chat_type = chat_protocol_get_default()->id;
 392                 chatnetrec->name = g_strdup(chatnet);
 393                 chatnet_create(chatnetrec);
 394         }
 395  
 396         family = config_node_get_str(node, "family", "");
 397  
 398         rec = CHAT_PROTOCOL(chatnetrec)->create_server_setup();
 399         rec->type = module_get_uniq_id("SERVER SETUP", 0);
true400         rec->chat_type = CHAT_PROTOCOL(chatnetrec)->id;     /* Null Pointer Dereference */
Preconditions
&$unknown_109610 != 0
&$unknown_109611 != 0
chat_protocols->next = 0
node->type <= 3
node->type >= 2
((char*)&$unknown_109612)[4] != *chat_protocols->data
((char*)&$unknown_109612)[4] >= 1
Postconditions
_g_boolean_var_' = 1
$unknown_109614' = &$unknown_109613
chatnet' = &$unknown_109611
chatnetrec' = &$unknown_109612
next_uniq_id' = &$unknown_109613 + 1
port' = 0
rec' = &$unknown_109614
server' = &$unknown_109610




Change Warning 6229.28293 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: