[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vdn_pPkjg=zyspnraz2RARrWJ6A76e8_PKLhtUrewFQMg@mail.gmail.com>
Date: Wed, 6 Sep 2023 16:30:15 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Hans de Goede <hdegoede@...hat.com>
Cc: Ingo Molnar <mingo@...nel.org>,
Justin Stitt <justinstitt@...gle.com>,
Steve Wahl <steve.wahl@....com>,
Mike Travis <mike.travis@....com>,
Dimitri Sivanich <dimitri.sivanich@....com>,
Russ Anderson <russ.anderson@....com>,
Darren Hart <dvhart@...radead.org>,
Andy Shevchenko <andy@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH v3] x86/platform/uv: refactor deprecated strcpy and strncpy
On Wed, Sep 6, 2023 at 3:16 PM Hans de Goede <hdegoede@...hat.com> wrote:
> On 9/6/23 14:10, Ingo Molnar wrote:
> strscpy(arg, val, strnchrnul(val, sizeof(arg)-1, '\n') - val + 1);
If you want to make it short and more readable, you can use
strscpy(arg, val, sizeof(arg));
strreplace(arg, '\n', '\0');
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists