You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Integer of 128 (0x80) must be encoded as 0x00 0x80. It effectively applies to all numbers which have the highest bit set to 1 (not only to 128 obviously).
It impacts your asn1.go functions sizeInt64/writeInt64.
I quickly workarounded this item in your lib
func sizeInt64(i int64) (size int) {
prev := int64(0)
for ; i != 0 || size == 0; i >>= 8 {
size++
prev = i
}
if prev&0x80 == 0x80 {
size++
}
return
}
func writeInt64(bytes *Bytes, i int64) (size int) {
prev := int64(0)
for ; i != 0 || size == 0; i >>= 8 { // Write at least one byte even if the value is 0
bytes.writeBytes([]byte{byte(i)})
size++
prev = i
}
if prev&0x80 == 0x80 {
bytes.writeBytes([]byte{byte(0)})
size++
}
return
}
The text was updated successfully, but these errors were encountered:
Integer of 128 (0x80) must be encoded as 0x00 0x80. It effectively applies to all numbers which have the highest bit set to 1 (not only to 128 obviously).
It impacts your asn1.go functions sizeInt64/writeInt64.
I quickly workarounded this item in your lib
The text was updated successfully, but these errors were encountered: