rpms/chntpw/devel chntpw-080526-reged-no-deref-null.patch, NONE, 1.1 chntpw.spec, 1.9, 1.10

Richard W.M. Jones rjones at fedoraproject.org
Wed Jul 22 14:29:54 UTC 2009


Author: rjones

Update of /cvs/pkgs/rpms/chntpw/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17637

Modified Files:
	chntpw.spec 
Added Files:
	chntpw-080526-reged-no-deref-null.patch 
Log Message:
Another patch from Jim Meyering.

chntpw-080526-reged-no-deref-null.patch:
 reged.c |    5 +++++
 1 file changed, 5 insertions(+)

--- NEW FILE chntpw-080526-reged-no-deref-null.patch ---
>From jim at meyering.net  Wed Jul 22 13:41:58 2009
Return-Path: jim at meyering.net
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on amd.home.annexia.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,
	UNPARSEABLE_RELAY autolearn=ham version=3.2.5
Received: from mail.corp.redhat.com [10.5.5.51]
	by amd.home.annexia.org with IMAP (fetchmail-6.3.8)
	for <rjones at localhost> (single-drop); Wed, 22 Jul 2009 13:41:58 +0100 (BST)
Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
 zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
 mail06.corp.redhat.com with LMTP; Wed, 22 Jul 2009 08:41:25 -0400 (EDT)
Received: from localhost (localhost.localdomain [127.0.0.1])
	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 52E8193C42
	for <rjones at redhat.com>; Wed, 22 Jul 2009 08:41:25 -0400 (EDT)
Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
	by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id i+F0NOkWPqt0 for <rjones at redhat.com>;
	Wed, 22 Jul 2009 08:41:25 -0400 (EDT)
Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26])
	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 29C8193C01
	for <rjones at mail.corp.redhat.com>; Wed, 22 Jul 2009 08:41:25 -0400 (EDT)
Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199])
	by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n6MCfOiN011483
	for <rjones at int-mx2.corp.redhat.com>; Wed, 22 Jul 2009 08:41:24 -0400
Received: from mx.meyering.net (sebastian-int.corp.redhat.com [172.16.52.221])
	by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n6MCfNP5023290
	for <rjones at redhat.com>; Wed, 22 Jul 2009 08:41:23 -0400
Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000)
	id 38377558B9; Wed, 22 Jul 2009 14:41:23 +0200 (CEST)
From: Jim Meyering <jim at meyering.net>
To: "Richard W. M. Jones" <rjones at redhat.com>
Subject: [PATCH] "reged -e" should not dereference NULL
Date: Wed, 22 Jul 2009 14:41:23 +0200
Message-ID: <87y6qg51qk.fsf at meyering.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26
Status: RO
Content-Length: 871
Lines: 27


>From d9203daf8e29290ca82b2433722e9e56cd0ab73f Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Wed, 22 Jul 2009 14:25:14 +0200
Subject: [PATCH] "reged -e" should not dereference NULL

* reged.c (main): Diagnose a missing hive file name with -e.
---
 reged.c |   30 +++++++++++++++++-------------
 1 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/reged.c b/reged.c
index cf395bc..f99f94e 100644
--- a/reged.c
+++ b/reged.c
@@ -99,6 +99,11 @@ int main(int argc, char **argv)
   }
   if (edit) {  /* Call editor. Rest of arguments are considered hives to load */
     hivename = argv[optind+no_hives];
+    if (!hivename) {
+      fprintf(stderr,"with -e you must specify at least one hive file name\n");
+      usage();
+      exit(1);
+    }
     do {
       if (!(hive[no_hives] = openHive(hivename,
 				      HMODE_RW|mode))) {



Index: chntpw.spec
===================================================================
RCS file: /cvs/pkgs/rpms/chntpw/devel/chntpw.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- chntpw.spec	22 Jul 2009 09:45:17 -0000	1.9
+++ chntpw.spec	22 Jul 2009 14:29:23 -0000	1.10
@@ -1,7 +1,7 @@
 Name:           chntpw
 # Version is taken from HISTORY.txt
 Version:        0.99.6
-Release:        11%{?dist}
+Release:        12%{?dist}
 Summary:        Change passwords in Windows SAM files
 Group:          Applications/Engineering
 License:        GPLv2
@@ -26,6 +26,7 @@ Patch3:         chntpw-080526-port-to-gc
 Patch4:         chntpw-080526-robustness.patch
 Patch5:         chntpw-080526-correct-test-for-failing-open-syscall.patch
 Patch6:         chntpw-080526-detect-failure-to-write-key.patch
+Patch7:         chntpw-080526-reged-no-deref-null.patch
 
 
 %description
@@ -53,6 +54,7 @@ mv WinReg.txt.eol WinReg.txt
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
 
 
 %build
@@ -84,8 +86,8 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
-* Wed Jul 22 2009 Richard W.M. Jones <rjones at redhat.com> - 0.99.6-11
-- Two more patches from Jim Meyering to improve general code quality.
+* Wed Jul 22 2009 Richard W.M. Jones <rjones at redhat.com> - 0.99.6-12
+- Two^W Three more patches from Jim Meyering to improve general code quality.
 
 * Mon Jul 20 2009 Richard W.M. Jones <rjones at redhat.com> - 0.99.6-10
 - Three patches from Jim Meyering aiming to improve the general




More information about the fedora-extras-commits mailing list