diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-08-17 01:59:30 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-08-17 20:40:43 -0400 |
commit | 60a25a7bf8aad7bd46d4a3b22342998b6bca4e94 (patch) | |
tree | fe1233755290c66b8decdb30466c9427a2d7ccd7 | |
parent | ae684b62a7ca4522acabb1e74f6b5651f5821233 (diff) | |
download | stasis-60a25a7bf8aad7bd46d4a3b22342998b6bca4e94.tar.gz |
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.
-rw-r--r-- | src/delivery.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |