fix: build of packages w/o BuildRoot segfault.
authorjbj <devnull@localhost>
Fri, 26 Feb 1999 21:47:33 +0000 (21:47 +0000)
committerjbj <devnull@localhost>
Fri, 26 Feb 1999 21:47:33 +0000 (21:47 +0000)
CVS patchset: 2840
CVS date: 1999/02/26 21:47:33

CHANGES
lib/rpmrc.c

diff --git a/CHANGES b/CHANGES
index 2b70acb..6afff94 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,5 @@
 2.90 -> 2.91
+       - fix: build of packages w/o BuildRoot segfault.
        - permit substitution of I18N strings from PO meta-catalogues.
        - rename file before unlinking to avoid EBUSY failures.
        - add callbacks for installer updates while doing URL xfers.
index 0b38c03..7726b07 100644 (file)
@@ -569,6 +569,9 @@ const char * rpmGetPath(const char *path, ...) {
     const char *s;
     va_list ap;
 
+    if (path == NULL)
+       return strdup("");
+
     p = buf;
     strcpy(p, path);
     pe = p + strlen(p);
@@ -576,7 +579,7 @@ const char * rpmGetPath(const char *path, ...) {
 
     va_start(ap, path);
     while ((s = va_arg(ap, const char *)) != NULL) {
-       /* XXX FIXME: this fixes onle some of the "...//..." problems */
+       /* XXX FIXME: this fixes only some of the "...//..." problems */
        if (pe > p && pe[-1] == '/')
            while(*s && *s == '/')      s++;
        if (*s != '\0') {