Another patch from Jim Meyering.
This commit is contained in:
parent
9cb37592c0
commit
113031981e
2 changed files with 75 additions and 3 deletions
70
chntpw-080526-reged-no-deref-null.patch
Normal file
70
chntpw-080526-reged-no-deref-null.patch
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
From jim@meyering.net Wed Jul 22 13:41:58 2009
|
||||
Return-Path: jim@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@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@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@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@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@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@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@meyering.net>
|
||||
To: "Richard W. M. Jones" <rjones@redhat.com>
|
||||
Subject: [PATCH] "reged -e" should not dereference NULL
|
||||
Date: Wed, 22 Jul 2009 14:41:23 +0200
|
||||
Message-ID: <87y6qg51qk.fsf@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@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))) {
|
||||
|
||||
|
|
@ -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-gcrypt-debian.patch
|
|||
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@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@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@redhat.com> - 0.99.6-10
|
||||
- Three patches from Jim Meyering aiming to improve the general
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue