Thread (53 messages) flat view 53 messages, 9 authors, 6d ago

Re: [PATCH 00/28] Replace remaining strlcat() call sites with snprintf()/seq_buf()

From: Takashi Iwai <hidden>
Date: 2026-09-15 11:30:14
Also in: dri-devel, intel-wired-lan, intel-xe, linux-devicetree, linux-edac, linux-gpio, linux-hardening, linux-media, linux-mips, linux-nfs, linux-samsung-soc, linux-scsi, linux-sound, linux-wireless, lkml, loongarch, netdev

On Tue, 15 Sep 2026 10:18:17 +0200,
Bill Wendling wrote:
strlcat() is deprecated: like strcat(), it requires re-scanning the
destination string from the beginning on every call, which is O(n^2)
when used to build up a string incrementally, and its truncation
behavior is easy to get wrong.
... but what many of your patches do is to replace strlcat() with
open-codes, which is more error-prone and easier to get wrong than
a single strlcat() call.
See:

  https://github.com/KSPP/linux/issues/370
It's clear that strlcat() isn't perfect and sometimes inefficient.
But blindly deprecating without providing a good alternative doesn't
sound like a right approach to me.


thanks,

Takashi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help