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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250228100319.10f6bb9e@gandalf.local.home>
Date: Fri, 28 Feb 2025 10:03:19 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Aditya Garg <gargaditya08@...e.com>
Cc: "pmladek@...e.com" <pmladek@...e.com>,
 "andriy.shevchenko@...ux.intel.com" <andriy.shevchenko@...ux.intel.com>,
 Rasmus Villemoes <linux@...musvillemoes.dk>, "senozhatsky@...omium.org"
 <senozhatsky@...omium.org>, "corbet@....net" <corbet@....net>,
 "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
 "apw@...onical.com" <apw@...onical.com>, "joe@...ches.com"
 <joe@...ches.com>, "dwaipayanray1@...il.com" <dwaipayanray1@...il.com>,
 "lukas.bulwahn@...il.com" <lukas.bulwahn@...il.com>,
 "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Hector
 Martin <marcan@...can.st>, "sven@...npeter.dev" <sven@...npeter.dev>, Janne
 Grunau <j@...nau.net>, "alyssa@...enzweig.io" <alyssa@...enzweig.io>,
 "asahi@...ts.linux.dev" <asahi@...ts.linux.dev>
Subject: Re: [PATCH v4] lib/vsprintf: Add support for generic FOURCCs by
 extending %p4cc

On Fri, 28 Feb 2025 14:09:48 +0000
Aditya Garg <gargaditya08@...e.com> wrote:

> > -    *p++ = ' ';
> > -    strcpy(p, orig & BIT(31) ? "big-endian" : "little-endian");
> > -    p += strlen(p);
> > +    if (pixel_fmt) {
> > +        *p++ = ' ';
> > +        strcpy(p, orig & BIT(31) ? "big-endian" : "little-endian");  
> 
> Do we need strscpy here?

Why? The size of what p points to has already been calculated to hold this:

	char output[sizeof("0123 little-endian (0x01234567)")];
	char *p = output;

Unless you changed something, it will not overflow.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ