Files
gentoo/dev-util/pkgconf/files/pkgconf-2.5.1-buf_sz.patch
Sam James a8abae6c9f dev-util/pkgconf: add 2.5.1, drop 2.5.0
.1 fixes a regression in .0.

Closes: https://bugs.gentoo.org/959232
Signed-off-by: Sam James <sam@gentoo.org>
2025-06-29 02:09:01 +01:00

20 lines
650 B
Diff

https://github.com/pkgconf/pkgconf/commit/aa6b5c4ca9cb5ea723b5c11e68a385fe46fd54a8
From aa6b5c4ca9cb5ea723b5c11e68a385fe46fd54a8 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@ariadne.space>
Date: Tue, 24 Jun 2025 16:31:21 -0700
Subject: [PATCH] libpkgconf: dependency: make sure buf_sz is at least 1 byte
--- a/libpkgconf/dependency.c
+++ b/libpkgconf/dependency.c
@@ -321,7 +321,7 @@ pkgconf_dependency_parse_str(pkgconf_client_t *client, pkgconf_list_t *deplist_h
memset(cmpname, '\0', sizeof cmpname);
- buf_sz = strlen(depends) * 2;
+ buf_sz = (strlen(depends) * 2) + 1;
buf = calloc(1, buf_sz);
if (buf == NULL)
return;