fix null dereference
authormarc <devnull@localhost>
Tue, 18 Feb 1997 01:47:16 +0000 (01:47 +0000)
committermarc <devnull@localhost>
Tue, 18 Feb 1997 01:47:16 +0000 (01:47 +0000)
CVS patchset: 1443
CVS date: 1997/02/18 01:47:16

build/spec.c

index 6fc81a4..70c8adf 100644 (file)
@@ -1177,7 +1177,8 @@ Spec parseSpec(FILE *f, char *specfile, char *buildRootOverride)
              default:
                /* XXX - should be able to drop the -n in non-%package parts */
                if (! lookup_package(spec, &cur_package, s, lookupopts)) {
-                   rpmError(RPMERR_INTERNAL, "Package lookup failed: %s", s);
+                   rpmError(RPMERR_INTERNAL, "Package lookup failed: %s",
+                            (s) ? s : "(main)");
                    return NULL;
                }
                rpmMessage(RPMMESS_DEBUG, "Switched to package: %s\n",