summaryrefslogtreecommitdiffstats
path: root/EmbeddedPkg/Application/AndroidFastboot/AndroidBootImg.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-10-24 18:29:35 +0100
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-10-28 13:51:45 +0100
commit310908760f5314c4a6d421ebcc6e1370bd2a1177 (patch)
treee983eee5690733121a02d6f9ca12ddbd2e0baab4 /EmbeddedPkg/Application/AndroidFastboot/AndroidBootImg.c
parent15d8747a5f0fea5f30d6d4f812f6aa3bbd4c5ba8 (diff)
downloadedk2-310908760f5314c4a6d421ebcc6e1370bd2a1177.tar.gz
edk2-310908760f5314c4a6d421ebcc6e1370bd2a1177.tar.bz2
edk2-310908760f5314c4a6d421ebcc6e1370bd2a1177.zip
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>
Diffstat (limited to 'EmbeddedPkg/Application/AndroidFastboot/AndroidBootImg.c')
-rw-r--r--EmbeddedPkg/Application/AndroidFastboot/AndroidBootImg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/EmbeddedPkg/Application/AndroidFastboot/AndroidBootImg.c b/EmbeddedPkg/Application/AndroidFastboot/AndroidBootImg.c
index bbca90fc08..f3e770bcc9 100644
--- a/EmbeddedPkg/Application/AndroidFastboot/AndroidBootImg.c
+++ b/EmbeddedPkg/Application/AndroidFastboot/AndroidBootImg.c
@@ -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;
}