diff --git a/lib/ipmi_hpmfwupg.c b/lib/ipmi_hpmfwupg.c index 2a4925c..8ada69b 100644 --- a/lib/ipmi_hpmfwupg.c +++ b/lib/ipmi_hpmfwupg.c @@ -1199,7 +1199,7 @@ HpmFwupgActionUploadFirmware(struct HpmfwupgComponentBitMask components, } else { count = (unsigned short)((pDataTemp+lengthOfBlock) - pData); } - memcpy(&uploadCmd.req->data, pData, bufLength); + memcpy(&uploadCmd.req->data, pData, count); imageOffset = 0x00; blockLength = 0x00; numTxPkts++;