summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
33c7e2f)
as suggested, a bitwise bounds check in cmddata.
}
if (bitLen>512) bitLen=512; //max output to 512 bits if we have more - should be plenty
}
if (bitLen>512) bitLen=512; //max output to 512 bits if we have more - should be plenty
- // equally divided by 16
- if ( bitLen % 16 > 0)
- bitLen = (bitLen/16);
+ // ensure equally divided by 16
+ bitLen &= 0xfff0;
for (i = 0; i <= (bitLen-16); i+=16) {
PrintAndLog("%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i",
for (i = 0; i <= (bitLen-16); i+=16) {
PrintAndLog("%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i",
return;
}
if (bitLen>512) bitLen=512;
return;
}
if (bitLen>512) bitLen=512;
+
+ // ensure equally divided by 16
+ bitLen &= 0xfff0;
+
+
for (i = 0; i <= (bitLen-16); i+=16) {
PrintAndLog("%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i",
BitStream[i],
for (i = 0; i <= (bitLen-16); i+=16) {
PrintAndLog("%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i",
BitStream[i],