|
From: | Dan Lukes |
Subject: | [Freeipmi-devel] Re: ipmi-sensors abends when configuration file not specified at all |
Date: | Mon, 16 Aug 2010 20:51:46 +0200 |
User-agent: | Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.11) Gecko/20100725 SeaMonkey/2.0.6 |
On 08/16/10 19:55, Albert Chu:
This should already be handled.
Where you think it is handled ? I found cmd_args->config_file = NULL; within _init_common_cmd_args (cmd_args) only.I found no other place called from ipmi-sensor that initialize config_file (not counting the command-line parser which doesn't apply when no --config-file option on command line)
What version of FreeIPMI are you running?
0.8.8
Perhaps your freeipmi.conf has some typo in it that triggers a different bug?
I have no freeipmi.conf at all. I'm fully satisfied with the defaults.If you will give me a hint where teh common.config_file is initialized to something else than NULL I will step the code in debugger and with some luck I will identify the place where the config_fiel is set back to NULL. Or, maybe, I will discover that code doesn't execute the line with initialization. But I can't found the line responsible for default initialization of config_file within ipmi-sensors's sources.
Dan
I hit the bug in the ipmi-sensors/src/ipmi-sensors-argp.c In the case the configuration file is not specified at all, the cmd_args->common.config_file == NULL Such situation is not handled correctly, the NULL is dereferenced and program abends. I suggest not to call config_file_parse() at all, when configration doesn't exist, e.g.: if (config_file_parse (cmd_args->common.config_file, should be changed to if (cmd_args->common.config_file != NULL&& config_file_parse (cmd_args->common.config_file, I tried it on my system and it helped. As alternative, such case can be handled inside of config_file_parse() function.
[Prev in Thread] | Current Thread | [Next in Thread] |