rv1126-uboot/cmd
Heinrich Schuchardt 3152629475 UPSTREAM: GPT: incomplete initialization in allocate_disk_part
memset(newpart, '\0', sizeof(newpart));
only initializes the firest 4 or 8 bytes of *newpart and not the whole
structure disk_part.

We should use sizeof(struct disk_part).

Instead of malloc and memset we can use calloc.

Identified by cppcheck.

Fixes: 09a49930e4 GPT: read partition table from device into a data structure
Change-Id: Ifc937b64f6ac6abc56c0c6bb3d094c2316b9268e
Reported-by: Coverity (CID: 167228)
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit f66bc0e0beeff7fa27c29f740d2f314d63b3346d)
2018-01-16 18:17:07 +08:00
..
fastboot Add support for fastboot command over UDP 2017-11-14 10:55:44 +08:00
mvebu
.gitignore
Kconfig cmd: bootrkp: add a cmd for rockchip rkimg bootloader 2017-12-08 18:13:25 +08:00
Makefile cmd: bootrkp: add a cmd for rockchip rkimg bootloader 2017-12-08 18:13:25 +08:00
aes.c
android_ab_select.c android: Fix off-by-one error when joining strings 2017-11-14 10:55:47 +08:00
android_cmds.c android: Implement A/B slot select. 2017-11-14 10:55:46 +08:00
armflash.c
bdinfo.c
bedbug.c
blk_common.c UPSTREAM: cmd: blk: Use LBAFU in the common block command 2018-01-16 18:16:48 +08:00
blkcache.c
blob.c
bmp.c
boot.c
boot_android.c cmd: boot_android: support legacy aosp image from rockchip 2017-12-08 18:13:25 +08:00
bootefi.c UPSTREAM: efi_loader: bootefi hello should use loadaddr 2018-01-16 18:16:48 +08:00
booti.c
bootm.c
bootmenu.c env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
bootrkp.c rockchip: bootrkp: add log when boot from recovery 2018-01-12 15:40:12 +08:00
bootstage.c
bootz.c
cache.c Remove the cmd_ prefix from command files 2016-01-25 10:39:43 -05:00
cbfs.c
charge.c cmd: charge: support command parameter 2017-12-05 09:34:48 +08:00
clk.c
config.c
console.c
cpu.c
cramfs.c
cros_ec.c
dataflash_mmc_mux.c
date.c
demo.c
dfu.c
diag.c
disk.c
display.c
echo.c
eeprom.c
efi.c
elf.c
ethsw.c
exit.c
ext2.c
ext4.c
fastboot.c Add support for fastboot command over UDP 2017-11-14 10:55:44 +08:00
fat.c
fdc.c
fdt.c UPSTREAM: fdt: Switch to using the verbose overlay application method 2018-01-16 18:16:48 +08:00
fitupd.c
flash.c
fpga.c
fpgad.c
fs.c
fs_uuid.c
fuse.c
gettime.c
gpio.c
gpt.c UPSTREAM: GPT: incomplete initialization in allocate_disk_part 2018-01-16 18:17:07 +08:00
hash.c
help.c
host.c
i2c.c
ide.c
ini.c
io.c
iotrace.c
irq.c
itest.c
jffs2.c
led.c
legacy_led.c
license.c
load.c
load_android.c Move Android Image loading logic to image-android.c 2017-11-14 10:55:46 +08:00
log.c
lzmadec.c
mac.c
md5sum.c
mdio.c
mem.c
mfsl.c
mii.c
misc.c
mmc.c UPSTREAM: blk: Remove various places that do flush cache after read 2018-01-16 18:16:48 +08:00
mmc_spi.c
mp.c
mtdparts.c
nand.c
net.c Add support for fastboot command over UDP 2017-11-14 10:55:44 +08:00
nvedit.c env: set env_update() parameter 'varvalue' as 'const char *' 2017-10-23 17:20:42 +08:00
nvme.c
onenand.c
part.c
pci.c
pcmcia.c
pmic.c
pxe.c
qfw.c
read.c
reginfo.c
regulator.c
reiser.c
remoteproc.c
rknand.c
rockusb.c cmd: rockusb: fix upgrade failed when gpt partitions exist 2017-11-14 11:12:42 +08:00
sata.c
scsi.c
setexpr.c
sf.c
sha1sum.c
sound.c
source.c
spi.c
spl.c UPSTREAM: cmd: spl: Fix compiling warning 2018-01-16 18:13:50 +08:00
strings.c
terminal.c
test.c
thordown.c
time.c
tpm.c
tpm_test.c
trace.c
tsi148.c
ubi.c
ubifs.c
universe.c
unzip.c
usb.c
usb_gadget_sdp.c
usb_mass_storage.c
version.c
ximg.c
yaffs2.c
zfs.c
zip.c