public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Ngo Luong Thanh Tra <ngotra27101996@gmail.com>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH] common: cli_hush: fix console_buffer overflow on boot retry
Date: Mon, 13 Apr 2026 20:09:32 -0600	[thread overview]
Message-ID: <20260414020932.GI41863@bill-the-cat> (raw)
In-Reply-To: <20260406023100.95279-1-S4210155@student.rmit.edu.au>

[-- Attachment #1: Type: text/plain, Size: 1046 bytes --]

On Mon, Apr 06, 2026 at 09:30:27AM +0700, Ngo Luong Thanh Tra wrote:

> Add const_strcpy() macro to linux/build_bug.h that enforces at
> compile time that the destination is a writable char array (not char *
> or const char *), the source is a string literal, and the source fits
> in the destination including the NUL terminator.
> 
> Fix the console_buffer extern declaration in console.h to include the
> array size so sizeof(console_buffer) is valid at call sites.
> 
> Replace unbounded strcpy() in cli_hush.c with const_strcpy().
> 
> Fixes: 657e19f8f2dd ("cli_hush: support running bootcmd on boot retry")
> 
> Changes in v3:
> - Reject const char * destinations in const_strcpy() (Simon Glass)
> 
> Signed-off-by: Ngo Luong Thanh Tra <S4210155@student.rmit.edu.au>

Can you please rebase on top of current master?

> Made-with: Cursor

Please see
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-assistants.rst
and rework this tag as well, thanks.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-04-14  2:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-06  2:30 [PATCH] common: cli_hush: fix console_buffer overflow on boot retry Ngo Luong Thanh Tra
2026-04-14  2:09 ` Tom Rini [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-04-21  5:35 Ngo Luong Thanh Tra
2026-04-21  8:06 ` Rasmus Villemoes

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=20260414020932.GI41863@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=ngotra27101996@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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