From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Sergey Shtylyov <s.shtylyov@omp.ru>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: core: devices: use scnprintf() instead of sprintf()
Date: Wed, 20 Apr 2022 08:40:21 +0200 [thread overview]
Message-ID: <Yl+q1QL2vkuKYPDx@kroah.com> (raw)
In-Reply-To: <ebfd7a94-34d2-6259-fa0c-4a5dcc649d2b@omp.ru>
On Tue, Apr 19, 2022 at 10:50:22PM +0300, Sergey Shtylyov wrote:
> The USB device dump code uses the sprintf() calls with a 2-page buffer,
> leaving 256 bytes at the end of that buffer to prevent buffer overflow.
> Using scnprntf() instead eliminates the very possibility of the buffer
> overflow, while also simplifying the code. This however is achieved at
> the expense of not printing the "(truncated)" line anymore when the end
> of that buffer is actually reached; instead a possible partial line at
> the end of buffer (not ending with '\n') is now not printed.
So you just changed a user-visable abi :(
Please no, obviously that is not allowed.
greg k-h
next prev parent reply other threads:[~2022-04-20 6:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-19 19:50 [PATCH] usb: core: devices: use scnprintf() instead of sprintf() Sergey Shtylyov
2022-04-20 6:40 ` Greg Kroah-Hartman [this message]
2022-04-20 20:04 ` Sergey Shtylyov
2022-04-21 6:10 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yl+q1QL2vkuKYPDx@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=s.shtylyov@omp.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).