There was an error while loading. Please reload this page.
2 parents 31a32a4 + 7a44914 commit 941f4e2Copy full SHA for 941f4e2
1 file changed
src/quote.rs
@@ -204,10 +204,11 @@ impl TDAttributes {
204
let kl = (input[3] & 0x80) != 0; // Bit 31
205
206
// Extract OTHER flags (bytes 4-7)
207
- let reserved_other = ((input[7] as u32) << 24)
+ // Mask bit 7 of input[7] (= PERFMON, bit 63) out of reserved_other.
208
+ let reserved_other = (((input[7] as u32) & 0x7F) << 24)
209
| ((input[6] as u32) << 16)
210
| ((input[5] as u32) << 8)
- | ((input[4] as u32) & 0x7F);
211
+ | (input[4] as u32);
212
let perfmon = (input[7] & 0x80) != 0; // Bit 63
213
214
Ok(TDAttributes {
0 commit comments