1 From jim@meyering.net Wed Jul 22 13:41:58 2009
2 Return-Path: jim@meyering.net
3 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on amd.home.annexia.org
5 X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,
6 UNPARSEABLE_RELAY autolearn=ham version=3.2.5
7 Received: from mail.corp.redhat.com [10.5.5.51]
8 by amd.home.annexia.org with IMAP (fetchmail-6.3.8)
9 for <rjones@localhost> (single-drop); Wed, 22 Jul 2009 13:41:58 +0100 (BST)
10 Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
11 zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
12 mail06.corp.redhat.com with LMTP; Wed, 22 Jul 2009 08:41:25 -0400 (EDT)
13 Received: from localhost (localhost.localdomain [127.0.0.1])
14 by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 52E8193C42
15 for <rjones@redhat.com>; Wed, 22 Jul 2009 08:41:25 -0400 (EDT)
16 Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
17 by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
18 with ESMTP id i+F0NOkWPqt0 for <rjones@redhat.com>;
19 Wed, 22 Jul 2009 08:41:25 -0400 (EDT)
20 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26])
21 by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 29C8193C01
22 for <rjones@mail.corp.redhat.com>; Wed, 22 Jul 2009 08:41:25 -0400 (EDT)
23 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199])
24 by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n6MCfOiN011483
25 for <rjones@int-mx2.corp.redhat.com>; Wed, 22 Jul 2009 08:41:24 -0400
26 Received: from mx.meyering.net (sebastian-int.corp.redhat.com [172.16.52.221])
27 by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n6MCfNP5023290
28 for <rjones@redhat.com>; Wed, 22 Jul 2009 08:41:23 -0400
29 Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000)
30 id 38377558B9; Wed, 22 Jul 2009 14:41:23 +0200 (CEST)
31 From: Jim Meyering <jim@meyering.net>
32 To: "Richard W. M. Jones" <rjones@redhat.com>
33 Subject: [PATCH] "reged -e" should not dereference NULL
34 Date: Wed, 22 Jul 2009 14:41:23 +0200
35 Message-ID: <87y6qg51qk.fsf@meyering.net>
37 Content-Type: text/plain; charset=us-ascii
38 X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26
44 >From d9203daf8e29290ca82b2433722e9e56cd0ab73f Mon Sep 17 00:00:00 2001
45 From: Jim Meyering <meyering@redhat.com>
46 Date: Wed, 22 Jul 2009 14:25:14 +0200
47 Subject: [PATCH] "reged -e" should not dereference NULL
49 * reged.c (main): Diagnose a missing hive file name with -e.
51 reged.c | 30 +++++++++++++++++-------------
52 1 files changed, 17 insertions(+), 13 deletions(-)
54 diff --git a/reged.c b/reged.c
55 index cf395bc..f99f94e 100644
58 @@ -99,6 +99,11 @@ int main(int argc, char **argv)
60 if (edit) { /* Call editor. Rest of arguments are considered hives to load */
61 hivename = argv[optind+no_hives];
63 + fprintf(stderr,"with -e you must specify at least one hive file name\n");
68 if (!(hive[no_hives] = openHive(hivename,