In h_read_settings, val variable could be NULL due to
ofnode_read_prop returning an error. This variable
would then be used as the src in strcpy.
Add a NULL check after calling ofnode_read_prop.
Signed-off-by: Francois Berder <fberder@outlook.fr>
Reviewed-by: Simon Glass <sjg@chromium.org>
tline = (struct scene_obj_textline *)obj;
val = ofnode_read_prop(node, obj->name, &len);
+ if (!val)
+ return log_msg_ret("tline", -ENOENT);
if (len >= tline->max_chars)
return log_msg_ret("str", -ENOSPC);
strcpy(abuf_data(&tline->buf), val);