summaryrefslogtreecommitdiff
path: root/lib/fprint.c
diff options
context:
space:
mode:
authorFlorian Festi <ffesti@redhat.com>2009-06-16 17:37:40 +0200
committerFlorian Festi <ffesti@redhat.com>2009-06-16 17:39:14 +0200
commit1b9e6d7f48a68fd677c70d04c9a6bb4274cf7b9f (patch)
tree29fdbee71aa051ba0588188d0773eec3fae163a2 /lib/fprint.c
parent5f57e212516cc6ea5b9dd8276977d85a07eeec56 (diff)
downloadlibrpm-tizen-1b9e6d7f48a68fd677c70d04c9a6bb4274cf7b9f.tar.gz
librpm-tizen-1b9e6d7f48a68fd677c70d04c9a6bb4274cf7b9f.tar.bz2
librpm-tizen-1b9e6d7f48a68fd677c70d04c9a6bb4274cf7b9f.zip
Fix Segfault for to be installed symlinks pointing to existing locations
fixes rhbz#505777
Diffstat (limited to 'lib/fprint.c')
-rw-r--r--lib/fprint.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/fprint.c b/lib/fprint.c
index d32eec1c0..e57ba2059 100644
--- a/lib/fprint.c
+++ b/lib/fprint.c
@@ -311,10 +311,10 @@ void fpLookupSubdir(rpmFpHash symlinks, rpmFpHash fphash, fingerPrintCache fpc,
/* setup current_fp for the new path */
found = 1;
current_fp = *fp;
- if (!fp->subDir) {
- lensubDir = 0;
- currentsubdir = endsubdir = NULL;
- break;
+ if (fp->subDir == NULL) {
+ /* directory exists - no need to look for symlinks */
+ rpmFpHashAddEntry(fphash, fp, ffi);
+ return;
}
lensubDir = strlen(fp->subDir);
currentsubdir = xstrdup(fp->subDir);