diff options
author | jbj <devnull@localhost> | 2002-01-27 16:49:06 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2002-01-27 16:49:06 +0000 |
commit | 69e97f28a018b37580e1d6daad02a38875592f92 (patch) | |
tree | 7d8ac0e3d3bb17e01d97e029ff8ddbe2c4ca3d8f /rpmio/macro.c | |
parent | 0bbb7bb94e340b22f584c9ebd8a1f667d68217bd (diff) | |
download | rpm-69e97f28a018b37580e1d6daad02a38875592f92.tar.gz rpm-69e97f28a018b37580e1d6daad02a38875592f92.tar.bz2 rpm-69e97f28a018b37580e1d6daad02a38875592f92.zip |
Merge from rpm-4.0.4.
- trap SIGILL for ppc64 inline asm voodoo fix from cross-dressed ppc32.
- fix: fancy hash fiddles if not a tty.
- fix: handle /.../ correctly in rpmCleanPath().
CVS patchset: 5274
CVS date: 2002/01/27 16:49:06
Diffstat (limited to 'rpmio/macro.c')
-rw-r--r-- | rpmio/macro.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/rpmio/macro.c b/rpmio/macro.c index 8523aefb1..8bb179a9e 100644 --- a/rpmio/macro.c +++ b/rpmio/macro.c @@ -1804,7 +1804,12 @@ char *rpmCleanPath(char * path) /*@switchbreak@*/ break; case '.': /* Leading .. is special */ - if (begin && s[1] == '.') { + /* Check that it is ../, so that we don't interpret */ + /* ..?(i.e. "...") or ..* (i.e. "..bogus") as "..". */ + /* in the case of "...", this ends up being processed*/ + /* as "../.", and the last '.' is stripped. This */ + /* would not be correct processing. */ + if (begin && s[1] == '.' && (s[2] == '/' || s[2] == '\0')) { /*fprintf(stderr, " leading \"..\"\n"); */ *t++ = *s++; /*@switchbreak@*/ break; |