[chntpw] Fix 'robustness' patch (#755622)
konradm
konradm at fedoraproject.org
Mon Dec 19 01:15:35 UTC 2011
commit 13bf89e14642a0da681384de5b6360178c3f8d57
Author: Conrad Meyer <cemeyer at uw.edu>
Date: Sun Dec 18 17:14:42 2011 -0800
Fix 'robustness' patch (#755622)
chntpw-110511-robustness.patch | 17 +++++++++--------
chntpw.spec | 5 ++++-
2 files changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/chntpw-110511-robustness.patch b/chntpw-110511-robustness.patch
index 11ea781..ea2363f 100644
--- a/chntpw-110511-robustness.patch
+++ b/chntpw-110511-robustness.patch
@@ -1,7 +1,6 @@
-diff -ur chntpw-110511.orig/ntreg.c chntpw-110511/ntreg.c
--- chntpw-110511.orig/ntreg.c 2011-05-11 12:33:56.000000000 -0700
-+++ chntpw-110511/ntreg.c 2011-11-01 13:42:22.125974945 -0700
-@@ -190,14 +190,16 @@
++++ chntpw-110511/ntreg.c 2011-12-18 17:09:06.290818997 -0800
+@@ -190,14 +190,18 @@
int fmyinput(char *prmpt, char *ibuf, int maxlen)
{
@@ -13,18 +12,21 @@ diff -ur chntpw-110511.orig/ntreg.c chntpw-110511/ntreg.c
+ len = strlen(ibuf);
- ibuf[strlen(ibuf)-1] = 0;
-+ if (len)
++ if (len) {
+ ibuf[len-1] = 0;
++ --len;
++ }
- return(strlen(ibuf));
+ return len;
}
/* Print len number of hexbytes */
-@@ -4120,6 +4122,14 @@
+@@ -4119,6 +4123,14 @@
+ closeHive(hdesc);
return(NULL);
}
-
++
+ if (r < sizeof (*hdesc)) {
+ fprintf(stderr,
+ "file is too small; got %d bytes while expecting %d or more\n",
@@ -32,7 +34,6 @@ diff -ur chntpw-110511.orig/ntreg.c chntpw-110511/ntreg.c
+ closeHive(hdesc);
+ return(NULL);
+ }
-+
+
/* Now run through file, tallying all pages */
/* NOTE/KLUDGE: Assume first page starts at offset 0x1000 */
-
diff --git a/chntpw.spec b/chntpw.spec
index 7399cd6..47b9014 100644
--- a/chntpw.spec
+++ b/chntpw.spec
@@ -1,7 +1,7 @@
Name: chntpw
# Version is taken from HISTORY.txt
Version: 0.99.6
-Release: 16.110511%{?dist}
+Release: 17.110511%{?dist}
Summary: Change passwords in Windows SAM files
Group: Applications/Engineering
License: GPLv2
@@ -82,6 +82,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Sun Dec 18 2011 Conrad Meyer <konrad at tylerc.org> - 0.99.6-17.110511
+- Fix 'robustness' patch (#755622)
+
* Tue Nov 1 2011 Conrad Meyer <konrad at tylerc.org> - 0.99.6-16.110511
- Update to latest upstream (110511) (#750005).
- Update fedora patches to apply cleanly, dropping useless hunks
More information about the scm-commits
mailing list