kernel: refactor CMD_GET_FULL_VERSION to safely initialize version string (#220)
Use strscpy()/strlcpy() to populate the version buffer in CMD_GET_FULL_VERSION instead of relying on uninitialized memory. This ensures the returned string is null-terminated and avoids exposing garbage data to user space. Signed-off-by: schqiushui <orochi9999@gmail.com>
This commit is contained in:
@@ -519,7 +519,7 @@ fn do_patch(
|
||||
let no_vendor_init_boot = !workdir
|
||||
.join("vendor_ramdisk")
|
||||
.join("init_boot.cpio")
|
||||
.exists();Add commentMore actions
|
||||
.exists();
|
||||
if no_ramdisk && no_vendor_init_boot {
|
||||
bail!("No compatible ramdisk found.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user