From d88614387f71b2faf474b64d4b246809463cbf4d Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 4 May 2012 04:48:06 +0000 Subject: [PATCH] fix possible crash --- src/i2p_stream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i2p_stream.cpp b/src/i2p_stream.cpp index ea353827b..2c2f07f23 100644 --- a/src/i2p_stream.cpp +++ b/src/i2p_stream.cpp @@ -288,9 +288,9 @@ namespace libtorrent } ptr = string_tokenize(next, ' ', &next); - if (ptr == 0 || strcmp(expect1, ptr)) { handle_error(invalid_response, h); return; } + if (ptr == 0 || expect1 == 0 || strcmp(expect1, ptr)) { handle_error(invalid_response, h); return; } ptr = string_tokenize(next, ' ', &next); - if (ptr == 0 || strcmp(expect2, ptr)) { handle_error(invalid_response, h); return; } + if (ptr == 0 || expect2 == 0 || strcmp(expect2, ptr)) { handle_error(invalid_response, h); return; } int result = 0; char const* message = 0;