From 88f68f5329fc1107107c3a81c7fc0b7f7063ae25 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Tue, 17 Jan 2012 17:37:59 +0200 Subject: server/red_channel: avoid segfault if stream == NULL --- server/red_channel.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'server') diff --git a/server/red_channel.c b/server/red_channel.c index e526179e..d2c9e6d8 100644 --- a/server/red_channel.c +++ b/server/red_channel.c @@ -162,6 +162,10 @@ static void red_peer_handle_incoming(RedsStream *stream, IncomingHandler *handle uint16_t msg_type; uint32_t msg_size; + if (!stream) { + return; + } + for (;;) { int ret_handle; if (handler->header_pos < handler->header.header_size) { -- cgit