]> git.pld-linux.org Git - packages/chntpw.git/blame - chntpw-080526-reged-no-deref-null.patch
patch Makefile for our optflags
[packages/chntpw.git] / chntpw-080526-reged-no-deref-null.patch
CommitLineData
35df8015
ER
1From jim@meyering.net Wed Jul 22 13:41:58 2009
2Return-Path: jim@meyering.net
3X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on amd.home.annexia.org
4X-Spam-Level:
5X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,
6 UNPARSEABLE_RELAY autolearn=ham version=3.2.5
7Received: 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)
10Received: 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)
13Received: 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)
16Received: 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)
20Received: 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)
23Received: 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
26Received: 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
29Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000)
30 id 38377558B9; Wed, 22 Jul 2009 14:41:23 +0200 (CEST)
31From: Jim Meyering <jim@meyering.net>
32To: "Richard W. M. Jones" <rjones@redhat.com>
33Subject: [PATCH] "reged -e" should not dereference NULL
34Date: Wed, 22 Jul 2009 14:41:23 +0200
35Message-ID: <87y6qg51qk.fsf@meyering.net>
36MIME-Version: 1.0
37Content-Type: text/plain; charset=us-ascii
38X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26
39Status: RO
40Content-Length: 871
41Lines: 27
42
43
44>From d9203daf8e29290ca82b2433722e9e56cd0ab73f Mon Sep 17 00:00:00 2001
45From: Jim Meyering <meyering@redhat.com>
46Date: Wed, 22 Jul 2009 14:25:14 +0200
47Subject: [PATCH] "reged -e" should not dereference NULL
48
49* reged.c (main): Diagnose a missing hive file name with -e.
50---
51 reged.c | 30 +++++++++++++++++-------------
52 1 files changed, 17 insertions(+), 13 deletions(-)
53
54diff --git a/reged.c b/reged.c
55index cf395bc..f99f94e 100644
56--- a/reged.c
57+++ b/reged.c
58@@ -99,6 +99,11 @@ int main(int argc, char **argv)
59 }
60 if (edit) { /* Call editor. Rest of arguments are considered hives to load */
61 hivename = argv[optind+no_hives];
62+ if (!hivename) {
63+ fprintf(stderr,"with -e you must specify at least one hive file name\n");
64+ usage();
65+ exit(1);
66+ }
67 do {
68 if (!(hive[no_hives] = openHive(hivename,
69 HMODE_RW|mode))) {
70
This page took 0.066159 seconds and 4 git commands to generate.