You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.5 KiB
54 lines
1.5 KiB
--- tools/ps_convert.c.orig 2009-04-27 16:33:31.000000000 +0200
|
|
+++ tools/ps_convert.c 2009-04-27 16:33:53.000000000 +0200
|
|
@@ -136,13 +136,14 @@
|
|
version_0_convert(FILE *in, FILE *out)
|
|
{
|
|
int rc, members = 0;
|
|
- UINT32 i, u32 = *(UINT32 *)buf;
|
|
+ UINT32 i;
|
|
+ UINT32 *u32 = (UINT32 *) &buf;
|
|
|
|
/* output the PS version */
|
|
OUT(out, "\1", 1);
|
|
|
|
/* number of keys */
|
|
- OUT(out, &u32, sizeof(UINT32));
|
|
+ OUT(out, u32, sizeof(UINT32));
|
|
|
|
/* The +- 1's below account for the byte we read in to determine
|
|
* if the PS file had a version byte at the beginning */
|
|
@@ -163,7 +163,7 @@
|
|
return -1;
|
|
}
|
|
|
|
- for (i = 1; i < u32; i++) {
|
|
+ for (i = 1; i < *u32; i++) {
|
|
/* read in subsequent key's headers */
|
|
if ((members = fread(buf, 2*sizeof(TSS_UUID) + 3*sizeof(UINT16),
|
|
1, in)) != 1) {
|
|
--- tools/ps_inspect.c.orig 2009-04-27 17:49:46.000000000 +0200
|
|
+++ tools/ps_inspect.c 2009-04-27 17:51:52.000000000 +0200
|
|
@@ -179,10 +179,11 @@
|
|
version_0_print(FILE *f)
|
|
{
|
|
int rc, members = 0;
|
|
- UINT32 i, u32 = *(UINT32 *)buf;
|
|
+ UINT32 i;
|
|
+ UINT32 *u32 = (UINT32 *) &buf;
|
|
|
|
PRINT("version: 0\n");
|
|
- PRINT("number of keys: %u\n", u32);
|
|
+ PRINT("number of keys: %u\n", *u32);
|
|
|
|
/* The +- 1's below account for the byte we read in to determine
|
|
* if the PS file had a version byte at the beginning */
|
|
@@ -203,7 +204,7 @@
|
|
return -1;
|
|
}
|
|
|
|
- for (i = 1; i < u32; i++) {
|
|
+ for (i = 1; i < *u32; i++) {
|
|
/* read in subsequent key's headers */
|
|
if ((members = fread(buf, 2*sizeof(TSS_UUID) + 3*sizeof(UINT16),
|
|
1, f)) != 1) {
|