On Thu, Sep 21, 2017 at 07:03:06PM +0200, Heinrich Schuchardt wrote: > 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: 09a49930e41 GPT: read partition table from device into a data structure > Reported-by: Coverity (CID: 167228) > Cc: Stefan Roese <[email protected]> > Signed-off-by: Heinrich Schuchardt <[email protected]> > Reviewed-by: Stefan Roese <[email protected]> > Reviewed-by: Simon Glass <[email protected]>
Applied to u-boot/master, thanks! -- Tom
signature.asc
Description: Digital signature
_______________________________________________ U-Boot mailing list [email protected] https://lists.denx.de/listinfo/u-boot

