From c613eb5ccee2e61b185bd6bdb705e2630edce88f Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Tue, 26 May 2020 13:41:39 -0600 Subject: [PATCH] libpkgconf: pkg: use a second pointer for demunging windows paths --- NEWS | 6 ++++++ libpkgconf/pkg.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index b475a7b..ba554f4 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,12 @@ Changes from previous version of pkgconf ======================================== +Changes from 1.7.1 to 1.7.2: +---------------------------- + +* Bug fixes: + - Fix a windows-specific crash relating to path fixups. + Changes from 1.7.0 to 1.7.1: ---------------------------- diff --git a/libpkgconf/pkg.c b/libpkgconf/pkg.c index 808b70f..214f544 100644 --- a/libpkgconf/pkg.c +++ b/libpkgconf/pkg.c @@ -389,8 +389,9 @@ pkgconf_pkg_new_from_file(pkgconf_client_t *client, const char *filename, FILE * * strrchr() took us to the last \ in that case, so we just have to see if * it is followed by a /. If so, lop it off. */ - if ((idptr = strrchr(idptr, '/')) != NULL) - idptr++; + char *mungeptr; + if ((mungeptr = strrchr(idptr, '/')) != NULL) + idptr = mungeptr++; #endif pkg->id = strdup(idptr);