From 9d093690fcd9dad0b25dc88c1ca7dc557c055b2f Mon Sep 17 00:00:00 2001 From: "Victor M. Alvarez" Date: Mon, 1 Jun 2026 12:45:35 +0200 Subject: [PATCH] Abort the collection of resources when the MAX_RESOURCES is reached. --- libyara/modules/pe/pe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libyara/modules/pe/pe.c b/libyara/modules/pe/pe.c index fe9a6b55..566991da 100644 --- a/libyara/modules/pe/pe.c +++ b/libyara/modules/pe/pe.c @@ -760,7 +760,7 @@ static int pe_collect_resources( { // Don't collect too many resources. if (pe->resources >= MAX_RESOURCES) - return RESOURCE_CALLBACK_CONTINUE; + return RESOURCE_CALLBACK_ABORT; yr_set_integer( yr_le32toh(rsrc_data->OffsetToData),