[Nut-upsdev] [Patch] upssched broken in version 2.6.4 with command with two arguments

Arnaud Quette aquette.dev at gmail.com
Wed Jul 4 19:01:18 UTC 2012


2012/7/3 Oliver Schonefeld <schonefeld at ids-mannheim.de>

> Hi,
>

Hi Oliver,


> the last commit to upssched.c (Merge Coverity branch, r3555) broke
> upssched with commands that have a second argument.
> If a command with a second argument is used, "enc" in line 697 is not an
> empty buffer and  snprintfcat() just appends some stuff, i.e. the
> following command
>   CANCEL onbatt online
> becomes
>   onlineCANCEL "onbatt" "online"
> and is then sent to the pipe-fd.
>
> The attached patch replaces snprintfcat() with snprintf() and fixes the
> problem.
>

thanks a lot for your report.
the issue and solution are both confirmed.

I've applied your patch to the trunk (r3670), and I'm now considering a
2.6.5 release for soon.

note that there are efforts underway to have unit tests, along with
integrating the regression test suite, run with our buildbots:
http://buildbot.networkupstools.org/

this would provide a decent CI (continuous integration) and prevent us from
future regression.

cheers,
Arnaud
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20120704/97275411/attachment.html>


More information about the Nut-upsdev mailing list