[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241018153843.GJ29862@gate.crashing.org>
Date: Fri, 18 Oct 2024 10:38:43 -0500
From: Segher Boessenkool <segher@...nel.crashing.org>
To: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@...il.com>
Cc: mpe@...erman.id.au, npiggin@...il.com, christophe.leroy@...roup.eu,
naveen@...nel.org, maddy@...ux.ibm.com, arnd@...db.de,
chentao@...inos.cn, linuxppc-dev@...ts.ozlabs.org,
linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.com
Subject: Re: [PATCH][next] powerpc/spufs: Replace snprintf() with the safer scnprintf() variant
On Fri, Oct 18, 2024 at 09:28:19PM +1300, Paulo Miguel Almeida wrote:
> The C99 standard specifies that {v}snprintf() returns the length of the
> data that *would have been* written if there were enough space.
Not including the trailing zero byte, and it can also return negative if
there was an encoding error. Yes.
Not that this matters at all for your patch, so why mention it?
Segher
Powered by blists - more mailing lists