edk2-nvidia icon indicating copy to clipboard operation
edk2-nvidia copied to clipboard

capsule update single image name limitation

Open coffinmatician opened this issue 1 year ago • 1 comments

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.

coffinmatician avatar Apr 11 '24 21:04 coffinmatician

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 avatar Apr 11 '24 21:04 bobm21

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

bobm21 avatar Aug 27 '24 22:08 bobm21