Date: Wed, 23 Jul 2003 01:57:56 +0200 From: Simon Barner <barner@in.tum.de> To: "Jacques A. Vidrine" <nectar@FreeBSD.org> Cc: Kris Kennaway <kris@obsecurity.org> Subject: Re: Fixing gcc 3.3 compile failures -- fix for net/netsaint-plugins Message-ID: <20030722235756.GB607@zi025.glhnet.mhn.de> In-Reply-To: <20030722195637.GC10922@madman.celabo.org> References: <20030718025200.GA36893@rot13.obsecurity.org> <20030722122608.GC552@zi025.glhnet.mhn.de> <20030722195637.GC10922@madman.celabo.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
> > --- plugins/check_by_ssh.c.orig Mon Apr 23 09:43:11 2001
> > +++ plugins/check_by_ssh.c Tue Jul 22 05:05:52 2003
> > @@ -191,7 +191,7 @@
> > if (commands>1)
> > remotecmd=strscat(remotecmd,";echo STATUS CODE: $?;");
> >
> > - if (strlen (remotecmd) <= 1)
> > + if (remotecmd==NULL)
> > usage ("No remotecmd\n");
> >
> > comm = ssprintf(comm,"%s %s '%s'",comm,hostname,remotecmd);
>
> This looks like more than a fix for a `compile failure'. The
> replacement code has different semantics than the new code.
> What is the `compile failure' that was being fixed here?
I don't know, either. This patch was part of the port before I touched
it [1]. Perhaps one should write
if ((remotecmd==NULL) || (strlen (remotecmd) <= 1))
to be on the safe side?
Cheers,
Simon
[1]:
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/net/netsaint-plugins/files/patch-check_by_ssh.c?rev=1.1&content-type=text/plain
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)
iD8DBQE/Hc+ECkn+/eutqCoRAuLKAJ4pE3Om4ayyfP9iHM5D44urINswLwCfTDlO
TIsgHpo+igePCwH/B1rRzkI=
=ihRM
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030722235756.GB607>
