Text  |   XML   |   Visible Warnings:

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

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2236.2242
Procedure: themes_reload
Trace: View
Modified: Wed Sep 2 11:53:56 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 themes_reload
 1300 void themes_reload(void) 
 1301 {
 1302         GSList *refs;
 1303         char *fname;
 1304  
 1305         /* increase every theme's refcount, and destroy them. this way if 
 1306            we want to use the theme before it's reloaded we don't crash. */ 
 1307         refs = NULL;
 1308         while (themes != NULL) {
 1309                 THEME_REC *theme = themes->data;
 1310  
 1311                 refs = g_slist_prepend(refs, theme);
 1312  
 1313                 theme->refcount++;
 1314                 theme_destroy(theme);
 1315         }
 1316  
 1317         /* first there's default theme.. */ 
 1318         current_theme = theme_load("default");
 1319         if (current_theme == NULL) {
 1320                 fname = g_strdup_printf("%s/default.theme", get_irssi_dir());
true1321                 current_theme = theme_create(fname, "default");
current_theme <= 40951322                 current_theme->default_color = -1;     /* Null Pointer Dereference */
Postconditions
current_theme' = 0
fname' = 0
theme' = $unknown_696843




Change Warning 2236.2242 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: