summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-02-21 12:11:54 +0200
committerPanu Matilainen <pmatilai@redhat.com>2009-02-21 12:11:54 +0200
commit58e92b976aebe43ebddbe2d2ec41bff0dd46b6fc (patch)
tree88db0d8963ade9812f5f9532924445195972b662 /build
parentb86d6a76d71c037727b20172299d418c6bc4ae11 (diff)
downloadlibrpm-tizen-58e92b976aebe43ebddbe2d2ec41bff0dd46b6fc.tar.gz
librpm-tizen-58e92b976aebe43ebddbe2d2ec41bff0dd46b6fc.tar.bz2
librpm-tizen-58e92b976aebe43ebddbe2d2ec41bff0dd46b6fc.zip
Loosen up restrictions on dependency token names (rhbz#455119)
- Package names aren't restricted to ascii, no point restricting dependency names either. - This lets UTF-8 to go through but also all sorts of other junk but as we haven't got a clue about the specs encoding, no can do. So we only check for bad characters from plain ascii.
Diffstat (limited to 'build')
-rw-r--r--build/parseReqs.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/build/parseReqs.c b/build/parseReqs.c
index 54230c7ec..f2130ecef 100644
--- a/build/parseReqs.c
+++ b/build/parseReqs.c
@@ -100,8 +100,11 @@ rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTag tagN,
Flags = (tagflags & ~RPMSENSE_SENSEMASK);
- /* Tokens must begin with alphanumeric, _, or / */
- if (!(risalnum(r[0]) || r[0] == '_' || r[0] == '/')) {
+ /*
+ * Tokens must begin with alphanumeric, _, or /, but we don't know
+ * the spec's encoding so we only check what we can: plain ascii.
+ */
+ if (isascii(r[0]) && !(risalnum(r[0]) || r[0] == '_' || r[0] == '/')) {
rpmlog(RPMLOG_ERR,
_("line %d: Dependency tokens must begin with alpha-numeric, '_' or '/': %s\n"),
spec->lineNum, spec->line);