From: Adam Dickmeiss Date: Mon, 8 Oct 2012 13:45:43 +0000 (+0200) Subject: z3950_client: fix string handling for init diagnostics X-Git-Tag: v1.3.48~1 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=d152384a9fc6337abc7cec0a5767577653aab9f0;p=metaproxy-moved-to-github.git z3950_client: fix string handling for init diagnostics in the case where addinfo was absent. --- diff --git a/src/filter_z3950_client.cpp b/src/filter_z3950_client.cpp index d4f78a9..a42fb61 100644 --- a/src/filter_z3950_client.cpp +++ b/src/filter_z3950_client.cpp @@ -238,9 +238,10 @@ void yf::Z3950Client::Assoc::fixup_init(ODR odr, Z_InitResponse *initrs) odr, (oaddinfo ? strlen(oaddinfo) : 0) + 20 + m_host.length()); + *naddinfo = '\0'; if (oaddinfo && *oaddinfo) { - strcpy(naddinfo, oaddinfo); + strcat(naddinfo, oaddinfo); strcat(naddinfo, " "); } strcat(naddinfo, "(backend=");