Index: trousers/tools/ps_convert.c =================================================================== --- trousers.orig/tools/ps_convert.c 2011-11-21 21:11:53.779074686 +0100 +++ trousers/tools/ps_convert.c 2012-04-05 22:22:14.372753689 +0200 @@ -110,9 +110,9 @@ OUT(out, buf, sizeof(TSS_UUID)); OUT(out, &buf[sizeof(TSS_UUID)], sizeof(TSS_UUID)); - pub_data_size = *(UINT16 *)&buf[(2 * sizeof(TSS_UUID))]; - blob_size = *(UINT16 *)&buf[(2 * sizeof(TSS_UUID)) + sizeof(UINT16)]; - cache_flags = *(UINT16 *)&buf[2*sizeof(TSS_UUID) + 2*sizeof(UINT16)]; + pub_data_size = *(UINT16 *)(buf + (2 * sizeof(TSS_UUID))); + blob_size = *(UINT16 *)(buf + (2 * sizeof(TSS_UUID)) + sizeof(UINT16)); + cache_flags = *(UINT16 *)(buf + 2*sizeof(TSS_UUID) + 2*sizeof(UINT16)); OUT(out, &pub_data_size, sizeof(UINT16)); OUT(out, &blob_size, sizeof(UINT16)); Index: trousers/tools/ps_inspect.c =================================================================== --- trousers.orig/tools/ps_inspect.c 2012-04-05 22:18:41.556752931 +0200 +++ trousers/tools/ps_inspect.c 2012-04-05 22:21:13.804753466 +0200 @@ -114,9 +114,9 @@ PRINT("parent uuid%d: ", i); print_hex(&buf[sizeof(TSS_UUID)], sizeof(TSS_UUID)); - pub_data_size = *(UINT16 *)&buf[(2 * sizeof(TSS_UUID))]; - blob_size = *(UINT16 *)&buf[(2 * sizeof(TSS_UUID)) + sizeof(UINT16)]; - cache_flags = *(UINT16 *)&buf[2*sizeof(TSS_UUID) + 2*sizeof(UINT16)]; + pub_data_size = *(UINT16 *)(buf + (2 * sizeof(TSS_UUID))); + blob_size = *(UINT16 *)(buf + (2 * sizeof(TSS_UUID)) + sizeof(UINT16)); + cache_flags = *(UINT16 *)(buf + 2*sizeof(TSS_UUID) + 2*sizeof(UINT16)); PRINT("pub_data_size%d: %hu\n", i, pub_data_size); PRINT("blob_size%d: %hu\n", i, blob_size); @@ -151,10 +151,10 @@ PRINT("parent uuid%d: ", i); print_hex(&buf[sizeof(TSS_UUID)], sizeof(TSS_UUID)); - pub_data_size = *(UINT16 *)&buf[(2 * sizeof(TSS_UUID))]; - blob_size = *(UINT16 *)&buf[(2 * sizeof(TSS_UUID)) + sizeof(UINT16)]; - vendor_data_size = *(UINT32 *)&buf[(2 * sizeof(TSS_UUID)) + 2*sizeof(UINT16)]; - cache_flags = *(UINT16 *)&buf[2*sizeof(TSS_UUID) + sizeof(UINT16) + sizeof(UINT32)]; + pub_data_size = *(UINT16 *)(buf + (2 * sizeof(TSS_UUID))); + blob_size = *(UINT16 *)(buf + (2 * sizeof(TSS_UUID)) + sizeof(UINT16)); + vendor_data_size = *(UINT32 *)(buf + (2 * sizeof(TSS_UUID)) + 2*sizeof(UINT16)); + cache_flags = *(UINT16 *)(buf + 2*sizeof(TSS_UUID) + sizeof(UINT16) + sizeof(UINT32)); PRINT("pub_data_size%d: %hu\n", i, pub_data_size); PRINT("blob_size%d: %hu\n", i, blob_size); @@ -229,7 +229,7 @@ version_1_print(FILE *f) { int rc, members = 0; - UINT32 i, u32 = *(UINT32 *)&buf[1]; + UINT32 i, u32 = *(UINT32 *)(buf + 1); PRINT("version: 1\n"); PRINT("number of keys: %u\n", u32);