Fix error
This commit is contained in:
parent
cb83224c60
commit
1fda6912da
@ -373,6 +373,7 @@ deserialize2(<<?POS_BITS, Rest/binary>>) ->
|
|||||||
{?FATE_BITS(Bint), Rest2};
|
{?FATE_BITS(Bint), Rest2};
|
||||||
deserialize2(<<?LONG_STRING, Rest/binary>>) ->
|
deserialize2(<<?LONG_STRING, Rest/binary>>) ->
|
||||||
{S, Rest2} = deserialize_one(Rest),
|
{S, Rest2} = deserialize_one(Rest),
|
||||||
|
true = is_integer(S) andalso S >= 0,
|
||||||
Size = S + ?SHORT_STRING_SIZE,
|
Size = S + ?SHORT_STRING_SIZE,
|
||||||
String = binary:part(Rest2, 0, Size),
|
String = binary:part(Rest2, 0, Size),
|
||||||
Rest3 = binary:part(Rest2, byte_size(Rest2), - (byte_size(Rest2) - Size)),
|
Rest3 = binary:part(Rest2, byte_size(Rest2), - (byte_size(Rest2) - Size)),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user