mirror of
https://github.com/zeromq/libzmq.git
synced 2025-02-23 23:16:41 +01:00
Check decoder's state function for NULL before calling it
Fixes bug reported by Peter Friend (http://lists.zeromq.org/pipermail/zeromq-dev/2012-November/019425.html)
This commit is contained in:
parent
8db8c45b18
commit
a8721c3c04
@ -148,6 +148,10 @@ namespace zmq
|
||||
// False is returned if the decoder has encountered an error.
|
||||
bool stalled ()
|
||||
{
|
||||
// Check whether there was decoding error.
|
||||
if (unlikely (static_cast <T*> (this)->next == NULL))
|
||||
return false;
|
||||
|
||||
while (!to_read) {
|
||||
if (!(static_cast <T*> (this)->*next) ()) {
|
||||
if (unlikely (!(static_cast <T*> (this)->next)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user