Contents of /trunk/chntpw/patches/chntpw-20040818-gcc4.patch
Parent Directory | Revision Log
Revision 144 -
(show annotations)
(download)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 1328 byte(s)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 1328 byte(s)
-import
1 | --- chntpw/chntpw.c 2004-08-18 17:42:01.000000000 -0300 |
2 | +++ chntpw.new/chntpw.c 2005-04-09 18:58:34.000000000 -0300 |
3 | @@ -511,7 +511,7 @@ |
4 | printf("** LANMAN password IS however set. Will now install new password as NT pass instead.\n"); |
5 | printf("** NOTE: Continue at own risk!\n"); |
6 | ntpw_offs = lmpw_offs; |
7 | - (unsigned int)*(vp+0xa8) = ntpw_offs - 0xcc; |
8 | + *((unsigned int*)vp+0xa8) = ntpw_offs - 0xcc; |
9 | ntpw_len = 16; |
10 | lmpw_len = 0; |
11 | } |
12 | @@ -621,14 +621,14 @@ |
13 | ntpw_len = 16; |
14 | lmpw_len = 16; |
15 | ntpw_offs -= 4; |
16 | - (unsigned int)*(vp+0xa8) = ntpw_offs - 0xcc; |
17 | + *((unsigned int*)vp+0xa8) = ntpw_offs - 0xcc; |
18 | *(vp + 0xa0) = 16; |
19 | *(vp + 0xac) = 16; |
20 | } |
21 | |
22 | for (i = 0; i < 16; i++) { |
23 | - (unsigned char)*(vp+ntpw_offs+i) = despw[i]; |
24 | - if (lmpw_len >= 16) (unsigned char)*(vp+lmpw_offs+i) = newlandes[i]; |
25 | + *(vp+ntpw_offs+i) = (char)despw[i]; |
26 | + if (lmpw_len >= 16) *(vp+lmpw_offs+i) = (char)newlandes[i]; |
27 | } |
28 | } else { |
29 | printf("Unable to set since it is blank.\n"); |
30 | --- chntpw/ntreg.c 2004-08-18 17:42:02.000000000 -0300 |
31 | +++ chntpw.new/ntreg.c 2005-04-09 19:07:50.000000000 -0300 |
32 | @@ -2514,7 +2514,7 @@ |
33 | ALLOC(kr,1,sizeof(int)+sizeof(int)); |
34 | |
35 | kr->len = sizeof(int); |
36 | - (int)kr->data = dword; |
37 | + kr->data = dword; |
38 | |
39 | r = put_buf2val(hdesc, kr, vofs, path, REG_DWORD); |
40 |