summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/UPT/InventoryWs.py
diff options
context:
space:
mode:
authorPaddyDeng <v-paddydeng@microsoft.com>2025-04-07 09:48:50 +0800
committerLiming Gao <gaoliming@byosoft.com.cn>2025-05-05 14:26:16 +0800
commit2cff8743ced9c2f79014a19077e91537fb938bb8 (patch)
tree3a33c23edde7b89bf5f4fc306237ce380dce2798 /BaseTools/Source/Python/UPT/InventoryWs.py
parent02ec228654b8e17d3966f29f99fde9cc22152d4d (diff)
downloadedk2-master.tar.gz
edk2-master.tar.bz2
edk2-master.zip
MdeModulePkg/Spi: Solving potential null ptr deref. in SpiNorFlashJedecSfdpHEADmaster
The pointer `Instance->SfdpBasicFlash` can be used before initializing. Example code flow: - CreateSpiNorFlashSfdpInstance: Allocate pool for `Instance` - InitialSpiNorFlashSfdpInstance - ReadSfdp - ReadSfdpHeader - FillWriteBuffer: Dereferencing `Instance->SfdpBasicFlash` - ReadSfdpBasicParameterTable: Allocate pool for `Instance->SfdpBasicFlash` Check both `Instance` and `Instance->SfdpBasicFlash` should have a non null value before dereferencing it. Otherwise use the defaut value 0. Also terminate the function if `Instance` or `WriteBuffer` is NULL. Signed-off-by: Paddy Deng <v-paddydeng@microsoft.com>
Diffstat (limited to 'BaseTools/Source/Python/UPT/InventoryWs.py')
0 files changed, 0 insertions, 0 deletions