freeipmi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Freeipmi-devel] ipmi-sensors abends when configuration file not specifi


From: Dan Lukes
Subject: [Freeipmi-devel] ipmi-sensors abends when configuration file not specified at all
Date: Sun, 15 Aug 2010 20:23:42 +0200
User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.11) Gecko/20100725 SeaMonkey/2.0.6


Hi.

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.

Hope it help.

Dan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]