From b10c3228b6cb7b712a35d3d6aed029bb06e707da Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 24 Jun 2010 15:55:38 +0200 Subject: [PATCH] Z39.50 client: fix NULL ptr reference. The NULL ptr reference could occur if two or more new client was checked for number of sockets . In this case host in Z39.50 Assoc would be NULL - prior to call to method 'client'. --- src/filter_z3950_client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filter_z3950_client.cpp b/src/filter_z3950_client.cpp index 601af44..683c09a 100644 --- a/src/filter_z3950_client.cpp +++ b/src/filter_z3950_client.cpp @@ -309,7 +309,7 @@ yf::Z3950Client::Assoc *yf::Z3950Client::Rep::get_assoc(Package &package) for (; it != m_clients.end(); it++) { yf::Z3950Client::Assoc *as = it->second; - if (!strcmp(as->get_hostname(), host.c_str())) + if (!strcmp(as->m_host.c_str(), host.c_str())) { number++; if (!as->m_in_use) -- 1.7.10.4