Skip to content
Unverified Commit adb1f95d authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Palmer Dabbelt
Browse files

riscv: Fix an off-by-one in get_early_cmdline()



The ending NULL is not taken into account by strncat(), so switch to
strlcat() to correctly compute the size of the available memory when
appending CONFIG_CMDLINE to 'early_cmdline'.

Fixes: 26e7aacb ("riscv: Allow to downgrade paging mode from the command line")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarAlexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/9f66d2b58c8052d4055e90b8477ee55d9a0914f9.1698564026.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent 9b1d9abe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment