EmbeddedPkg/AndroidFastboot: eliminate deprecated string function calls
Get rid of calls to unsafe string functions. These are deprecated and may be removed in the future. Note that this also addresses a latent potential issue in HandleDownload(), where NumBytesString[] (which comes from the wire) is assumed to contain a string representation of a number with all the significant digits in the first 8 bytes, which is not guaranteed by the protocol. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
This commit is contained in:
@@ -84,7 +84,8 @@ ParseAndroidBootImg (
|
||||
+ ALIGN_VALUE (Header->KernelSize, Header->PageSize));
|
||||
}
|
||||
|
||||
AsciiStrnCpy (KernelArgs, Header->KernelArgs, BOOTIMG_KERNEL_ARGS_SIZE);
|
||||
AsciiStrnCpyS (KernelArgs, BOOTIMG_KERNEL_ARGS_SIZE, Header->KernelArgs,
|
||||
BOOTIMG_KERNEL_ARGS_SIZE);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user