Add type 'x' in Field::decode.
type 'x' means byte array (array of unsigned chars) so it is strictly not correct to return a LongString (array of signed chars). But with this change the library can continue going after receiving type 'x'. The original code crashes or starts doing undefined things when receiving a nonempty byte array from a client.
This commit is contained in:
parent
ca49382bfc
commit
71abd6d1d1
|
|
@ -43,6 +43,7 @@ std::unique_ptr<Field> Field::decode(InBuffer &frame)
|
|||
case 'T': return std::unique_ptr<Field>(new Timestamp(frame));
|
||||
case 'F': return std::unique_ptr<Field>(new Table(frame));
|
||||
case 'V': return std::unique_ptr<Field>(new VoidField(frame));
|
||||
case 'x': return std::unique_ptr<Field>(new LongString(frame));
|
||||
default: return nullptr;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue