dm: Fix potential overflow bug
Fix a potential overflow problem in get_more_acpi_dev_info where ch_read might have a value greater than 32. Tracked-On: #6769 Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
This commit is contained in:
parent
2f5db5f4ee
commit
496a653b0d
|
@ -165,7 +165,7 @@ int get_mmio_hpa_resource(char *name, uint64_t *res_start, uint64_t *res_size)
|
|||
*/
|
||||
int get_more_acpi_dev_info(char *hid, uint32_t instance, struct acpi_dev_pt_ops *ops)
|
||||
{
|
||||
char pathbuf[128], line[64];
|
||||
char pathbuf[128], line[32];
|
||||
int ret = -1;
|
||||
size_t ch_read;
|
||||
FILE *fp;
|
||||
|
|
Loading…
Reference in New Issue