From 60a25a7bf8aad7bd46d4a3b22342998b6bca4e94 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Sat, 17 Aug 2024 01:59:30 -0400 Subject: Bugfix: Avoid incorrect package selection * With large package lists that contain multiple packages starting with the same strstr() would pick the first match * This adds a temporary name variable that strcmp() can check against. --- src/delivery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/delivery.c b/src/delivery.c index e6f9aa6..f460566 100644 --- a/src/delivery.c +++ b/src/delivery.c @@ -1473,7 +1473,7 @@ void delivery_defer_packages(struct Delivery *ctx, int type) { strcpy(nametmp, name); } // Is the [test:NAME] in the package name? - if (strstr(name, test->name)) { + if (!strcmp(nametmp, test->name)) { // Override test->version when a version is provided by the (pip|conda)_package list item guard_free(test->version); if (spec_begin && spec_end) { -- cgit