diff options
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | build/parseReqs.c | 8 |
2 files changed, 9 insertions, 0 deletions
@@ -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; } |