]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/HttpDxe/HttpImpl.c
NetworkPkg/HttpDxe: fix 32-bit truncation in HTTPS download
[mirror_edk2.git] / NetworkPkg / HttpDxe / HttpImpl.c
index 6b877314bd571ebd8f033ced9fbe5a9c40f84f52..1acbb60d10143e3e8fa5cde1d37a9ed3e70ca86d 100644 (file)
@@ -1348,7 +1348,7 @@ HttpResponseWorker (
     //\r
     // Process the received the body packet.\r
     //\r
-    HttpMsg->BodyLength = MIN (Fragment.Len, (UINT32) HttpMsg->BodyLength);\r
+    HttpMsg->BodyLength = MIN ((UINTN) Fragment.Len, HttpMsg->BodyLength);\r
 \r
     CopyMem (HttpMsg->Body, Fragment.Bulk, HttpMsg->BodyLength);\r
 \r