Skip to content

Commit

Permalink
Fix uninitialized scalar variable
Browse files Browse the repository at this point in the history
Ori-Tracked-On: OAM-122829
Tracked-On: OAM-127436
Signed-off-by: Ni, Erchang <[email protected]>
Signed-off-by: Chen, Gang G <[email protected]>
  • Loading branch information
Francesca0901 authored and GangSecurity committed Nov 17, 2024
1 parent e80c7f1 commit b09c100
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/dw3/dw3.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ UsbdEpTxData (
USB_XFER_REQUEST TxReq;

TxReq.actual_xfer_len = 0; /* Avoid Uninitialized scalar variable */
TxReq.stream_id = 0;
TxReq.frame_num = 0;
TxReq.zlp = 0;

/* set endpoint data */
UsbdSetEpInfo (&(TxReq.ep_info), &(IoReq->EndpointInfo));
Expand Down Expand Up @@ -770,6 +773,10 @@ UsbdEpRxData (
EFI_STATUS Status = EFI_DEVICE_ERROR;
USB_XFER_REQUEST RxReq;
RxReq.actual_xfer_len = 0; /* Avoid Uninitialized scalar variable */
RxReq.stream_id = 0;
RxReq.frame_num = 0;
RxReq.zlp = 0;

UINT32 ReqPacket;

DEBUG ((DEBUG_INFO, "RX REQUEST in: IoReq->IoInfo.Length: 0x%x\n", IoReq->IoInfo.Length));
Expand Down

0 comments on commit b09c100

Please sign in to comment.