From a3436e2b0adb7edc8c8f7772995ab4018ff0deff Mon Sep 17 00:00:00 2001 From: Yvonne Kaire Date: Mon, 17 Nov 2025 15:03:07 -0800 Subject: [PATCH] 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. This approach ensures consistency with other Qualcomm tools, which also ignore such patches. Signed-off-by: Yvonne Kaire --- patch.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/patch.c b/patch.c index eafea0b..f218b77 100644 --- a/patch.c +++ b/patch.c @@ -80,11 +80,17 @@ int patch_execute(struct qdl_device *qdl, int (*apply)(struct qdl_device *qdl, s return 0; list_for_each_entry(patch, &patches, node) { + if (!patch->filename) + continue; + if (!strcmp(patch->filename, "DISK")) count++; } list_for_each_entry(patch, &patches, node) { + if (!patch->filename) + continue; + if (strcmp(patch->filename, "DISK")) continue;