u-boot/drivers
Miquel Raynal fd973ca696 tpm: sandbox: fix wrong check on pcr_map
The second check on pcr_map in sandbox_tpm2_xfer() is wrong. It should
check for pcr_map not being empty. Instead, it is a pure copy/paste of
the first check which is redundant.

This has been found thanks to a Coverity Scan report:

    CID 183370:  Memory - illegal accesses  (UNINIT)
    Using uninitialized value "pcr_index".
        put_unaligned_be32(tpm->pcr_extensions[pcr_index], recv);

This is because pcr_index is initialized only if the user input is
correct, ie. at least one valid bit is set in pcr_map.

Fix the second check and also initialize pcr_index to 0 (which is
harmless in case of error) to make Coverity Scan happy.

Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-08-13 14:04:04 -04:00
..
adc adc: Add driver for STM32 ADC 2018-08-03 19:53:10 -04:00
ata scsi: ceva: add ls1012a soc support 2018-07-26 10:59:35 -07:00
axi axi: Add AXI sandbox driver and simple emulator 2018-08-11 08:09:39 +02:00
bios_emulator bios_emulator: remove assignment without effect 2018-07-23 14:33:21 -04:00
block block: Add SPL_BLOCK_CACHE and default n 2018-06-18 14:43:13 -04:00
bootcount bootcount: Fix misaligned cache operation 2018-08-03 19:53:54 -04:00
clk clk: at91: utmi: add timeout for utmi lock 2018-08-13 14:03:57 -04:00
core dm: core: Add ofnode function to read PCI vendor and device id 2018-08-08 12:49:31 +01:00
cpu bcm6838: add initial support 2018-08-08 13:38:17 +02:00
crypto SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ddr drivers/ddr/fsl: fix '__hwconfig without a buffer' messages 2018-07-26 11:54:00 -07:00
demo SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
dfu dfu: Provide more verbose error message 2018-08-08 22:22:08 +02:00
dma SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
fastboot usb: fastboot: Convert USB f_fastboot to shared fastboot 2018-05-30 11:59:21 +02:00
firmware SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
fpga drivers: fpga: zynqpl: fix compilation with SPL 2018-07-19 10:49:57 +02:00
gpio gpio: xilinx: Add support for using label property 2018-08-07 11:03:43 +02:00
i2c i2c: imx_lpi2c: add uclass api support 2018-08-06 14:28:23 +02:00
input SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
led dm: led: move default state support in led uclass 2018-08-10 10:27:32 -04:00
mailbox SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
memory SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
misc Merge git://git.denx.de/u-boot-fsl-qoriq 2018-08-13 12:34:55 -04:00
mmc Merge branch 'master' of git://git.denx.de/u-boot-samsung 2018-08-07 21:36:20 -04:00
mtd Merge git://git.denx.de/u-boot-fsl-qoriq 2018-08-13 12:34:55 -04:00
net fsl/mc: Limit the ethernet name to ETH_NAME_LEN 2018-08-08 08:23:49 -07:00
nvme SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pch SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pci Merge git://git.denx.de/u-boot-fsl-qoriq 2018-08-13 12:34:55 -04:00
pcmcia SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
phy phy: sun4i-usb: Update PHY#3 rst_mask only for H3_H5 2018-07-31 11:41:49 +05:30
pinctrl pinctrl: renesas: Fix register usage in sh_pfc_{read,write} 2018-06-19 06:15:55 +02:00
power power: Add CONFIG_SPL_POWER_DOMAIN config 2018-08-06 11:51:10 +02:00
pwm pwm: sunxi: add support for PWM found on Allwinner A64 2018-05-15 08:18:09 +02:00
qe SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ram bmips: ram: add an option to force the size of the ram 2018-08-08 13:34:27 +02:00
remoteproc SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
reset misc: stm32: Add STM32MP1 support 2018-07-20 15:55:05 -04:00
rtc Patch queue for efi - 2018-07-25 2018-07-30 16:02:29 -04:00
scsi SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
serial drivers: serial: document on_baudrate() 2018-08-10 13:45:32 -04:00
smem drivers: smem: sandbox 2018-07-19 16:31:38 -04:00
soc SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sound SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spi arm: sunxi: Allwinner A10 SPI driver 2018-08-03 11:14:08 +05:30
spmi SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sysreset Merge git://git.denx.de/u-boot-x86 2018-07-20 19:31:30 -04:00
thermal SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
timer x86: timer: tsc: Allow specifying clock rate from device tree again 2018-07-02 09:23:28 +08:00
tpm tpm: sandbox: fix wrong check on pcr_map 2018-08-13 14:04:04 -04:00
usb Merge branch 'master' of git://git.denx.de/u-boot-usb 2018-08-10 07:21:02 -04:00
video video_display: Add Xilinx LogiCore DP TX 2018-08-11 09:18:44 +02:00
watchdog watchdog: cadence: Do not stop wdt in probe 2018-07-19 10:49:56 +02:00
Kconfig drivers: Add AXI uclass 2018-08-11 08:07:36 +02:00
Makefile drivers: Add AXI uclass 2018-08-11 08:07:36 +02:00