Socket server crashes with random client data

Description

Compile any zmq 4, from download, git master, branches.
Then jzmq 2 or 3.
Create a simple java client similar to the first example from the book, like:

final ZContext context = new ZContext();
final Socket socket = context.createSocket(ZMQ.REP);
socket.bind("tcp://*:5555");
byte[] msg = socket.recv();

On a different console, run telnet localhost 5555 and write some chars plus enter.

The java code (.recv()) dies with the following line:
Assertion failed: buffer_size == header_size (stream_engine.cpp:484

Environment

MacOSX 10.8.5, zmq 4.x (any version, including current git head), jzmq 2 or 3, java 7

Status

Assignee

Unassigned

Reporter

BrunoR

Labels

None

Components

Fix versions

Affects versions

4.0.0
4.0.1

Priority

Critical
Configure