[zeromq-dev] [PATCH] decoder asserts

Christian Gudrian christian at gudrian.org
Wed Oct 27 10:49:41 CEST 2010


Am 23.10.2010 21:00, schrieb Martin Sustrik:

> Applied to master.

if (!(static_cast <T*> (this)->*next) ()) {
     if (unlikely (!(static_cast <T*> (this)->next)))
         return (size_t) -1;
     return size_;
}

Wouldn't it be wise to check for a null method pointer _before_ 
dereferencing it?

Christian



More information about the zeromq-dev mailing list