Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Uninitialized Variable  at modules-load.c:188

Categories: LANG.MEM.UVAR CWE:457
Warning ID: 2121.2122
Procedure: module_load_name
Trace: View
Modified: Wed Sep 2 11:51:21 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/core/modules-load.c
   Enter module_load_name
 158 static int module_load_name(const char *path, const char *rootmodule,
true159                             const char *submodule, int silent) 
 160 {
 161         void (*module_init) (void);
 162         void (*module_deinit) (void);
 163         GModule *gmodule;
 164         MODULE_REC *module;
 165         MODULE_FILE_REC *rec;
 166         gpointer value1, value2;
 167         char *initfunc, *deinitfunc;
 168         int found;
 169  
 170         gmodule = module_open(path, &found);
 171         if (gmodule == NULL) {
 172                 if (!silent || found) {
 173                         module_error(MODULE_ERROR_LOAD, g_module_error(),
 174                                      rootmodule, submodule);
 175                 }
 176                 return found ? 0 : -1;
 177         }
 178  
 179         /* get the module's init() and deinit() functions */ 
 180         initfunc = module_get_func(rootmodule, submodule, "init");
 181         deinitfunc = module_get_func(rootmodule, submodule, "deinit");
 182         found = g_module_symbol(gmodule, initfunc, &value1) && 
 183                 g_module_symbol(gmodule, deinitfunc, &value2);
 184         g_free(initfunc);
 185         g_free(deinitfunc);
 186  
 187         module_init = value1;
value2 is uninitialized188         module_deinit = value2;     /* Uninitialized Variable */
Preconditions
&$unknown_161361 != 0
Postconditions
deinitfunc' = &$unknown_161363
errno' != 0
found' = 0
gmodule' = &$unknown_161361
initfunc' = &$unknown_161362
path' = $param_1
rootmodule' = $param_2
silent' = $param_4
submodule' = $param_3
value1' = module_init'




Change Warning 2121.2122 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: