NVIDIA / edk2-nvidia

NVIDIA EDK2 platform support
Other
78 stars 36 forks source link

capsule update single image name limitation #96

Closed coffinmatician closed 2 months ago

coffinmatician commented 7 months ago

As I was reading through the code I noticed that https://github.com/NVIDIA/edk2-nvidia/blob/0c326dcc1fbee072cb03509e42fb48f0cb0c4ce2/Silicon/NVIDIA/Library/FmpDeviceLib/TegraFmp.c#L1127 probably was meant to be:

  FwPackageCopyImageName (PkgName, PkgImageInfo, sizeof (PkgName));

instead of the current:

  FwPackageCopyImageName (PkgName, PkgImageInfo, FW_IMAGE_NAME_LENGTH);

as the length is in terms of bytes, and not CHAR16s from my reading of the function's description, and other usages of it in this file.

bobm21 commented 7 months ago

Thanks for reporting this! Yes, it will be corrected as you indicate in an upcoming release. Without the fix, the length of the partition name for a single image capsule update is limited to 18 CHAR16s instead of the full 36 CHAR16s that should be supported.

bobm21 commented 2 months ago

fixed here: https://github.com/NVIDIA/edk2-nvidia/commit/99f3180994c61b476cdd0152653335a4409b810a