From: Michael Tremer Date: Tue, 21 Feb 2023 12:56:07 +0000 (+0000) Subject: dependencies: Fix parsing complex dependencies X-Git-Tag: 0.9.29~392 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e8fed418b380914ee79eeffeac94493f648e979;p=pakfire.git dependencies: Fix parsing complex dependencies It is possible that a complex dependency has more than one closing bracket. In that case, we will take too much of the string. This patch makes sure we take the first bracket. Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/dependencies.c b/src/libpakfire/dependencies.c index 4084d01f7..9a2f3b527 100644 --- a/src/libpakfire/dependencies.c +++ b/src/libpakfire/dependencies.c @@ -126,7 +126,7 @@ static Id pakfire_parse_namespace(Pool* pool, const char* s) { Id namespace = pool_strn2id(pool, s, p - s, 1); // Find the end of the string - s = strrchr(p, ')'); + s = strchr(p, ')'); if (!s) return 0;