Skip to content

Commit

Permalink
QcomModulePkg: Allocate gRXBuffer size to match requested size
Browse files Browse the repository at this point in the history
Allocated fbd.gRxBuffer currently is 1MB which queued to
receive cmd from host is less than size of command requested
which is GetXfrSize() 16MB.

The command size buffer of more than 1MB can cause crash
on device, which is due to buffer overflow.

Change to allocate fbd.gRxBuffer equal to maximum requested
size.

Change-Id: I16c947412dc805c0ca7e364967c53120a824d3ad
  • Loading branch information
Mayank Grover committed Nov 18, 2020
1 parent f293620 commit 0727b7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion QcomModulePkg/Library/FastbootLib/FastbootMain.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ found at
#include "FastbootMain.h"
#include "UsbDescriptors.h"

#define USB_BUFF_SIZE 1024 * 1024 * 1
#define USB_BUFF_SIZE USB_BUFFER_SIZE

/* Global fastboot data */
static FastbootDeviceData Fbd;
Expand Down

0 comments on commit 0727b7b

Please sign in to comment.