Ensure the hash length (3x)#896
Conversation
Codecov Report
@@ Coverage Diff @@
## master #896 +/- ##
==========================================
- Coverage 45.05% 45.03% -0.03%
==========================================
Files 178 178
Lines 12600 12608 +8
==========================================
+ Hits 5677 5678 +1
- Misses 6923 6930 +7
Continue to review full report at Codecov.
|
| void ISerializable.Deserialize(BinaryReader reader) | ||
| { | ||
| reader.Read(data_bytes, 0, data_bytes.Length); | ||
| if (reader.Read(data_bytes, 0, data_bytes.Length) != data_bytes.Length) |
There was a problem hiding this comment.
Sounds redudant but maybe looks necessary, right?
There was a problem hiding this comment.
How could you read something and it be different than the size of it?
There was a problem hiding this comment.
With less data.
Is possible to read 1 byte, but only the first byte in the array will be filled
There was a problem hiding this comment.
But how less, since data_byte.Lenght was fixed?
I will leave this for you guys, too deep to me...aheuaheauea jajaja
I will talk to Igor.
There was a problem hiding this comment.
@vncoelho it reads up to "length", it doesn't mean it will always read that length (if it has only one byte, like Shargon mentioned)
* Update cli.md * Update cli.md
* Ensure the hash length * Update UIntBase.cs * Fix ecpoint
Before this patch, was possible to parse an array of hashes only with the length of the array, so is easier to produce undesired results.