Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Null Pointer Dereference  at channels-setup.c:132

Categories: LANG.MEM.NPD CWE:476
Warning ID: 4763.28235
Procedure: channel_setup_read
Trace: view
Modified: Thu Nov 26 11:08:12 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/channels-setup.c
   Enter channel_setup_read
 113 static CHANNEL_SETUP_REC *channel_setup_read(CONFIG_NODE *node) 
 114 {
 115         CHANNEL_SETUP_REC *rec;
 116         CHATNET_REC *chatnetrec;
 117         char *channel, *chatnet;
 118  
 119         g_return_val_if_fail(node != NULL, NULL);
 120  
 121         channel = config_node_get_str(node, "name", NULL);
 122         chatnet = config_node_get_str(node, "chatnet", NULL);
 123  
 124         chatnetrec = chatnet == NULL ? NULL : chatnet_find(chatnet);
 125         if (channel == NULL || chatnetrec == NULL) {
 126                 /* missing information.. */ 
 127                 return NULL;
 128         }
 129  
 130         rec = CHAT_PROTOCOL(chatnetrec)->create_channel_setup();
 131         rec->type = module_get_uniq_id("CHANNEL SETUP", 0);
true132         rec->chat_type = CHAT_PROTOCOL(chatnetrec)->id;     /* Null Pointer Dereference */  /* Null Test After Dereference (ID: 4762.28233) */
Preconditions
&$unknown_15141 != 0
&$unknown_15143 != 0
((char*)((char*)$unknown_15142)[4])[4] <= 0
node->type <= 3
node->type >= 2
Postconditions
_g_boolean_var_' = 1
$unknown_15144' = next_uniq_id
channel' = &$unknown_15143
chatnet' = &$unknown_15141
chatnetrec' = ((char*)$unknown_15142)[4]
next_uniq_id' = next_uniq_id + 1
rec' = &$unknown_15144




Change Warning 4763.28235 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: