From 275746a36b3c637c5a3e097cba5996036cb66885 Mon Sep 17 00:00:00 2001 From: jbj Date: Sun, 15 Feb 2004 23:51:36 +0000 Subject: [PATCH] - fix: setfiles (aka rpmsx.c) dinna handle patterns correctly. CVS patchset: 7093 CVS date: 2004/02/15 23:51:36 --- CHANGES | 1 + lib/rpmsx.c | 4 ++-- rpm.spec.in | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 13c57b5..271ec69 100644 --- a/CHANGES +++ b/CHANGES @@ -16,6 +16,7 @@ - re-add --enable-posixmutexes to build. - fix: set fcontext from pkg when file_contexts doesn't exist (#114040). - fix: set fcontext for "mkdir -p" directories not in packages. + - fix: setfiles (aka rpmsx.c) dinna handle patterns correctly. 4.2.1 -> 4.2.2: - unify signal handling in librpmio, use condvar to deliver signal. diff --git a/lib/rpmsx.c b/lib/rpmsx.c index f01690c..a61ccaa 100644 --- a/lib/rpmsx.c +++ b/lib/rpmsx.c @@ -83,13 +83,13 @@ static size_t rpmsxsPStem(const char * const buf) { /*@observer@*/ static const char * const regex_chars = ".^$?*+|[({"; - const char * tmp = strchr(buf + 1, '/'); + const char * tmp = strchr(buf, '/'); const char * ind; if (!tmp) return 0; - for (ind = buf + 1; ind < tmp; ind++) { + for (ind = buf; ind < tmp; ind++) { if (strchr(regex_chars, (int)*ind)) return 0; } diff --git a/rpm.spec.in b/rpm.spec.in index 958cd90..795f973 100644 --- a/rpm.spec.in +++ b/rpm.spec.in @@ -485,6 +485,7 @@ exit 0 * Sun Feb 15 2004 Jeff Johnson 4.3-0.11 - fix: set fcontext from pkg when file_contexts doesn't exist (#114040). - fix: set fcontext for "mkdir -p" directories not in packages. +- fix: setfiles (aka rpmsx.c) dinna handle patterns correctly. * Wed Feb 11 2004 Jeff Johnson 4.3-0.10 - re-add --enable-posixmutexes to build. -- 2.7.4