freeipmi-devel
[Top][All Lists]
Advanced

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

Re: [Freeipmi-devel] freeipmi channel number options useless


From: Albert Chu
Subject: Re: [Freeipmi-devel] freeipmi channel number options useless
Date: Mon, 01 Jun 2015 14:15:25 -0700

Thanks.  Applied.  Did an audit and found a few other places it was
forgotten.  I'll do a new release with the fixes.

Al

On Fri, 2015-05-29 at 21:30 +0000, James Buren wrote:
> The freeipmi channel number options are useless on Debian / Ubuntu. It spits 
> out 'invalid channel number' for each of these arguments, regardless of the 
> number given: --lan-channel-number, --serial-channel-number, 
> --sol-channel-number.
> 
> I have found the source of the error. It is to be found in the 
> ipmi-config-argp.c source file under the _ipmi_config_parse_channel_number 
> function.
> strtol is being used incorrectly in this function. See here: 
> http://pubs.opengroup.org/onlinepubs/009695399/functions/strtol.html
> 
> 
> "Since 0, {LONG_MIN} or {LLONG_MIN}, and {LONG_MAX} or {LLONG_MAX} are 
> returned on error and are also valid returns on success, an application 
> wishing to check for error situations should set errno to 0, then call 
> strtol() or strtoll(), then check errno."
> 
> errno must be set to zero before strtol is called for the error checking to 
> work correctly. I have attached a patch to correct this bug. Thank you.
-- 
Albert Chu
address@hidden
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory





reply via email to

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