Fix infinite recursion on non-ERANGE return from getcwd() during install.
authorjbj <devnull@localhost>
Sat, 15 Aug 1998 14:04:57 +0000 (14:04 +0000)
committerjbj <devnull@localhost>
Sat, 15 Aug 1998 14:04:57 +0000 (14:04 +0000)
CVS patchset: 2245
CVS date: 1998/08/15 14:04:57

CHANGES
lib/install.c

diff --git a/CHANGES b/CHANGES
index 9e21fec..a66bcbf 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -17,6 +17,8 @@
        - create /usr/lib/rpm directory and move rpmrc et al there
 
 2.5.2 -> 2.5.3:
+       - fix infinite recursion on non-ERANGE return from getcwd() during
+         install.
        - rm .depend for multiple builds in same tree (Will Partain)
        - add special case code for "/" in %files.
        - better query semantics with symlinks (Tim Mooney)
index 7e932b9..39a9fc3 100644 (file)
@@ -598,7 +598,7 @@ int rpmInstallPackage(char * rootdir, rpmdb db, int fd,
     if (rootdir) {
        currDirLen = 50;
        currDir = malloc(currDirLen);
-       while (!getcwd(currDir, currDirLen)) {
+       while (!getcwd(currDir, currDirLen) && errno == ERANGE) {
            currDirLen += 50;
            currDir = realloc(currDir, currDirLen);
        }