From: Berto Furth <redacted>
Use maximum size in declaration of ATAG cmdline string.
The declaration of the cmdline string in the ATAG type tag_cmdline
uses an array size of 1. This means that the fortified versions of
string functions (like strlcpy) will panic when they see that the
actual contents of the cmdline string are bigger than 1 byte.
Fix is to simply indicate that the string can actually be up to
COMMAND_LINE_SIZE bytes by setting the array size as such.
Signed-off-by: Berto Furth <redacted>
Tested-by: Berto Furth <redacted>
---
arch/arm/include/uapi/asm/setup.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/include/uapi/asm/setup.h b/arch/arm/include/uapi/asm/setup.h
index 25ceda63b284..9c88c919467b 100644
--- a/arch/arm/include/uapi/asm/setup.h
+++ b/arch/arm/include/uapi/asm/setup.h
@@ -124,7 +124,7 @@ struct tag_videolfb {
#define ATAG_CMDLINE 0x54410009
struct tag_cmdline {
- char cmdline[1]; /* this is the minimum size */
+ char cmdline[COMMAND_LINE_SIZE];
};
/* acorn RiscPC specific information */--
2.32.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel