Two minor bugs
xlz opened this issue · comments
I found your code useful. Here are two bugs I found during hacking.
If I define a accessor member of bit field like unsigned int useSecurity:1
, the accessor returns 0xffffffff
for actual value 1
. The bug is in magic3.hpp:
-if (((bitfield_mask+1)>>1)&unsignedT) //negative
+if ( ((T)-1) < 0 && (((bitfield_mask+1)>>1)&unsignedT)) //negative if T is signed
The second bug is in ssltrace_debug
, vfprintf(stderr,
should use vfprintf(ssltrace_log_handle(),
.