summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES1
-rw-r--r--build/parseReqs.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 705eb0795..8429b8ce5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -14,6 +14,7 @@
- add new fully recursive macro.c
2.5.3 -> 2.5.4:
+ - provides/obsoletes requires tokens that begin with alnum or _.
- non-zero exit status for verify failures.
- hpux does setreuid differently (Hermann Lauer).
- check for setreuid portably (Eugene Kanter).
diff --git a/build/parseReqs.c b/build/parseReqs.c
index 67cf01a71..05938b43a 100644
--- a/build/parseReqs.c
+++ b/build/parseReqs.c
@@ -125,6 +125,14 @@ int parseProvidesObsoletes(Spec spec, Package pkg, char *field, int tag)
spec->line);
return RPMERR_BADSPEC;
}
+ if (!(isalnum(prov[0]) || prov[0] == '_')) {
+ rpmError(RPMERR_BADSPEC,
+ "line %d: %s: tokens must begin with alpha-numeric: %s",
+ spec->lineNum,
+ (tag == RPMTAG_PROVIDES) ? "Provides" : "Obsoletes",
+ spec->line);
+ return RPMERR_BADSPEC;
+ }
addReqProv(spec, pkg, flags, prov, NULL, 0);
line = NULL;
}