TPM and string_to_uuid 64bits issue
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
eCryptfs |
Fix Released
|
Wishlist
|
Dustin Kirkland |
Bug Description
There is an issue running on 64b arch. and using TPM.
(Credit goes to Janos)
Patch to fix :
diff -urp ecryptfs-
--- ecryptfs-
+++ ecryptfs-
@@ -542,17 +542,16 @@ static uint32_t tspi_num_params = 1;
*/
static void string_
{
- BYTE tmp[(sizeof(
- unsigned long l;
- uint32_t i;
+ BYTE tmp[(sizeof(
+ uint32_t i, l;
- tmp[sizeof(unsigned long) * 2] = '\0';
+ tmp[sizeof(
for (i = 0; i < (sizeof(TSS_UUID) * 2);
- i += (sizeof(unsigned long) * 2)) {
- memcpy(tmp, &str[i], sizeof(unsigned long) * 2);
+ i += (sizeof(uint32_t) * 2)) {
+ memcpy(tmp, &str[i], sizeof(uint32_t) * 2);
l = strtoul((char *)tmp, NULL, 16);
l = htonl(l);
- memcpy(&((BYTE *)uuid)[i/2], &l, sizeof(unsigned long));
+ memcpy(&((BYTE *)uuid)[i/2], &l, sizeof(uint32_t));
}
}
Related branches
Changed in ecryptfs: | |
status: | Confirmed → In Progress |
Changed in ecryptfs: | |
status: | Fix Committed → Fix Released |
Tyler, any objections here?
I'm inclined to apply this patch...