Skip to content

Commit 6eaae75

Browse files
committed
Ignore patches with empty filenames.
Some device builds include patches with empty filenames. This change adds a check to ignore those patches and prevent segmentation faults. Signed-off-by: Yvonne Kaire <[email protected]>
1 parent 661ca1c commit 6eaae75

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

patch.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,17 @@ int patch_execute(struct qdl_device *qdl, int (*apply)(struct qdl_device *qdl, s
8080
return 0;
8181

8282
list_for_each_entry(patch, &patches, node) {
83+
if (!patch->filename)
84+
continue;
85+
8386
if (!strcmp(patch->filename, "DISK"))
8487
count++;
8588
}
8689

8790
list_for_each_entry(patch, &patches, node) {
91+
if (!patch->filename)
92+
continue;
93+
8894
if (strcmp(patch->filename, "DISK"))
8995
continue;
9096

0 commit comments

Comments
 (0)