fix: segfault with "--sign" w/o supplying files (#4651).
authorjbj <devnull@localhost>
Mon, 23 Aug 1999 23:10:35 +0000 (23:10 +0000)
committerjbj <devnull@localhost>
Mon, 23 Aug 1999 23:10:35 +0000 (23:10 +0000)
CVS patchset: 3247
CVS date: 1999/08/23 23:10:35

CHANGES
rpm.c

diff --git a/CHANGES b/CHANGES
index 0246fc0..e15b6b0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -32,6 +32,8 @@
        - match "de" when locale is specified as "de_DE.ISO-8859-1@Munich".
        - add versions to obsoletes.
        - add %_install_langs to configure languages to be installed.
+       - add LC_ALL/LC_MESSAGES to query locale search.
+       - fix: segfault with "--sign" w/o supplying files (#4651).
 
 3.0.1 -> 3.0.2
        - eliminate armv4 entries from rpmrc (Andrew E. Mileski).
diff --git a/rpm.c b/rpm.c
index cf699b1..bc7cdae 100755 (executable)
--- a/rpm.c
+++ b/rpm.c
@@ -1053,7 +1053,10 @@ int main(int argc, char ** argv)
            struct stat sb;
            int errors = 0;
 
-           argv = poptGetArgs(optCon);
+           if ((argv = poptGetArgs(optCon)) == NULL)) {
+               fprintf(stderr, _("no files to sign\n"));
+               errors++;
+           } else
            while (*argv) {
                if (stat(*argv, &sb)) {
                    fprintf(stderr, _("cannot access file %s\n"), *argv);