mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-12 11:14:46 +01:00
Problem: curve_client_t may emit misleading event on bad data processed by curve_client_t::decode
Solution: use check_basic_command_structure in curve_client_t::decode, also prepare other client mechanisms to use that method by rearranging inheritance hierarchy
This commit is contained in:
@@ -38,11 +38,12 @@
|
||||
namespace zmq
|
||||
{
|
||||
|
||||
class msg_t;
|
||||
class session_base_t;
|
||||
|
||||
// Abstract class representing security mechanism.
|
||||
// Different mechanism extends this class.
|
||||
|
||||
class msg_t;
|
||||
|
||||
class mechanism_t
|
||||
{
|
||||
public:
|
||||
@@ -146,6 +147,16 @@ namespace zmq
|
||||
bool check_socket_type (const std::string& type_) const;
|
||||
};
|
||||
|
||||
}
|
||||
class mechanism_base_t : public mechanism_t
|
||||
{
|
||||
protected:
|
||||
mechanism_base_t (session_base_t *const session_,
|
||||
const options_t &options_);
|
||||
|
||||
session_base_t *const session;
|
||||
|
||||
int check_basic_command_structure (msg_t *msg_);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user