make fdt_node_get_prop fail by end of node

master
Сергей Маринкевич 3 years ago
parent 339addff30
commit f33df2c4e6

@ -187,7 +187,10 @@ static int fdt_node_get_prop(char * filename, char * fdt, char * strings, int of
buf_offset = 0;
}
if (FDT_PROP == fdt32_to_cpu(*(int *)(fdt_offset_ptr_(fdt, buf, buf_offset))))
int tag = fdt32_to_cpu(*(int *)(fdt_offset_ptr_(fdt, buf, buf_offset)));
if (FDT_END_NODE == tag)
break;
else if (FDT_PROP == tag)
{
const struct fdt_property *prop = fdt_offset_ptr_(fdt, buf, buf_offset);
debug("prop->nameoff: %x (%x)\n", fdt32_to_cpu(prop->nameoff), fdt_off_dt_strings(fdt));

Loading…
Cancel
Save