Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Null Pointer Dereference  at themes.c:660

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2267.2273
Procedure: theme_set_format
Trace: View
Modified: Wed Sep 2 11:55:23 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/themes.c
   Enter theme_init_module
 686 static void theme_init_module(THEME_REC *theme, const char *module,
 687                               CONFIG_REC *config) 
 688 {
 689         MODULE_THEME_REC *rec;
 690         FORMAT_REC *formats;
 691         int n;
 692  
 693         formats = g_hash_table_lookup(default_formats, module);
 694         g_return_if_fail(formats != NULL);
 695  
true696         rec = theme_module_create(theme, module);
 697  
 698         if (config != NULL)
rec <= 4095699                 theme_read_formats(theme, module, config, rec);
     Enter theme_init_module / theme_read_formats
 665   static void theme_read_formats(THEME_REC *theme, const char *module,
$param_4 <= 4095666                                  CONFIG_REC *config, MODULE_THEME_REC *rec) 
 667   {
 668           CONFIG_NODE *node;
 669           GSList *tmp;
 670    
 671           node = config_node_traverse(config, "formats", FALSE);
 672           if (node == NULL) return;
 673           node = config_node_section(node, module, -1);
 674           if (node == NULL) return;
 675    
 676           for (tmp = node->value; tmp != NULL; tmp = tmp->next) {
 677                   node = tmp->data;
 678    
 679                   if (node->key != NULL && node->value != NULL) {
 680                           theme_set_format(theme, rec, module,
rec <= 4095681                                            node->key, node->value);
       Enter theme_init_module / theme_read_formats / theme_set_format
 652     static void theme_set_format(THEME_REC *theme, MODULE_THEME_REC *rec,
 653                                  const char *module,
$param_2 <= 4095654                                  const char *key, const char *value) 
 655     {
 656             int num;
 657      
 658             num = format_find_tag(module, key);
 659             if (num != -1) {
rec <= 4095660                     rec->formats[num] = g_strdup(value);     /* Null Pointer Dereference */
       Exit theme_init_module / theme_read_formats / theme_set_format
     Exit theme_init_module / theme_read_formats
Preconditions
&$unknown_938656 != 0
&$unknown_938661 = 0
((char*)((char*)$unknown_938660)[16])[16] != 0
((char*)((char*)$unknown_938660)[16])[8] != 0
$unknown_938659 <= 3
$unknown_938659 >= 2
Postconditions
_g_boolean_var_' = 1
config' = $param_3
config' = $param_3
formats' = &$unknown_938656
key' = ((char*)((char*)$unknown_938660)[16])[8]
module' = $param_2
module' = $param_2
module' = $param_2
node' = ((char*)$unknown_938660)[16]
num' = 0
rec' = 0
rec' = 0
rec' = &$unknown_938661
theme' = $param_1
theme' = $param_1
theme' = $param_1
tmp' = ((char*)&$unknown_938660)[16]
value' = ((char*)((char*)$unknown_938660)[16])[16]




Change Warning 2267.2273 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: