main: Fix NULL pointer derefernce

This commit is contained in:
Pali Rohár committed 2021-05-02 17:48:49 +02:00
1 parent a5279bffaf
commit df2340e48d
1 file changed
+4 -2
+4 -2
View File
@@ -182,8 +182,10 @@ static void parse_image_arg(char * arg, struct image_list ** image_first) {
*(parts++) = 0; *(parts++) = 0;
layout_file = parts; layout_file = parts;
while ( ( ptr = strchr(layout_file, '%') ) ) if ( layout_file ) {
layout_file = ptr+1; while ( ( ptr = strchr(layout_file, '%') ) )
layout_file = ptr+1;
}
type = NULL; type = NULL;
device = NULL; device = NULL;