Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Null Pointer Dereference  at themes.c:660

Categories: LANG.MEM.NPD CWE:476
Warning ID: 7330.28423
Procedure: theme_set_format
Trace: view
Modified: Thu Nov 26 11:09:39 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/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,
 666                                  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,
 654                                  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_567075 != 0
((char*)((char*)$unknown_567077)[8])[4] != 0
((char*)((char*)$unknown_567077)[8])[8] != 0
$unknown_567076 <= 3
$unknown_567076 >= 2
Postconditions
_g_boolean_var_' = 1
config' = config
formats' = &$unknown_567075
key' = ((char*)((char*)$unknown_567077)[8])[4]
module' = module
module' = module
node' = ((char*)$unknown_567077)[8]
num' = 0
rec' = 0
rec' = 0
rec' = 0
theme' = theme
theme' = theme
tmp' = ((char*)&$unknown_567077)[8]
value' = ((char*)((char*)$unknown_567077)[8])[8]




Change Warning 7330.28423 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: