lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 8 Feb 2021 13:27:16 +0530
From:   Sumit Garg <sumit.garg@...aro.org>
To:     Daniel Thompson <daniel.thompson@...aro.org>
Cc:     kgdb-bugreport@...ts.sourceforge.net,
        Jason Wessel <jason.wessel@...driver.com>,
        Douglas Anderson <dianders@...omium.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] kdb: Refactor env variables get/set code

Hi Daniel,

On Fri, 5 Feb 2021 at 23:06, Daniel Thompson <daniel.thompson@...aro.org> wrote:
>
> On Thu, Feb 04, 2021 at 03:44:20PM +0530, Sumit Garg wrote:
> > @@ -318,6 +318,65 @@ int kdbgetintenv(const char *match, int *value)
> >  }
> >
> >  /*
> > + * kdb_setenv() - Alter an existing environment variable or create a new one.
> > + * @var: Name of the variable
> > + * @val: Value of the variable
> > + *
> > + * Return: Zero on success, a kdb diagnostic on failure.
> > + */
> > +static int kdb_setenv(const char *var, const char *val)
> > +{
> > +     int i;
> > +     char *ep;
> > +     size_t varlen, vallen;
> > +
> > +     varlen = strlen(var);
> > +     vallen = strlen(val);
> > +     ep = kdballocenv(varlen + vallen + 2);
> > +     if (ep == (char *)0)
> > +             return KDB_ENVBUFFULL;
> > +
> > +     sprintf(ep, "%s=%s", var, val);
> > +
> > +     ep[varlen+vallen+1] = '\0';
>
> What is this line for? It looks pointless to me.
>

Yeah, it looks redundant to me as well.

> I know it's copied from the original code but it doesn't look like the
> sort of code you should want your name to appear next to in a git blame
> ;-) .
>

Sure, let me get rid of it in v3.

-Sumit

>
> Daniel.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ