# Re: \[PATCH v4\] lib/bootconfig: guard xbc\_node\_compose\_key\_after() buffer size

- From: Steven Rostedt \<rostedt@goodmis.org\>
- Date: 2026-03-18 00:43:31 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2026/03/3465166
- Thread: https://ratatoskr.run/linux-trace-kernel/2026/03/3464893/t.md

```text
On Wed, 18 Mar 2026 09:02:43 +0900
Masami Hiramatsu (Google) [ref] wrote:

> Yes, that is checked in vsnprintf(), not its caller.
> I think linux kernel should ensure the the return value is smaller
> than INT_MAX, and return -EOVERFLOW if not.

Well, there's very few places that could have a buffer size of > 2G.

What's the max bootconfig limit? Could you create a bootconfig that is
greater than 2G?

If not, then yeah, we shouldn't really care about overflows (and that
includes not worrying about typecasting the size variable to int).

-- Steve
```
